Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reduce to 10 iterations in performance benchmark #5854

Merged
merged 5 commits into from
Dec 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

@click.command()
@options.CODE(required=False, help='A code that can run the ``ArithmeticAddCalculation``, for example bash.')
@click.option('-n', 'number', type=int, default=100, show_default=True, help='The number of processes to submit.')
@click.option('-n', 'number', type=int, default=10, show_default=True, help='The number of processes to launch.')
@click.option('--daemon/--without-daemon', default=False, is_flag=True, help='Submit to daemon or run synchronously.')
@decorators.with_dbenv()
def main(code, number, daemon):
Expand All @@ -28,9 +28,9 @@ def main(code, number, daemon):
import uuid

from aiida import orm
from aiida.common import exceptions
from aiida.engine import run_get_node, submit
from aiida.engine.daemon.client import get_daemon_client
from aiida.manage import get_manager
sphuber marked this conversation as resolved.
Show resolved Hide resolved
from aiida.plugins import CalculationFactory
from aiida.tools.graph.deletions import delete_nodes

Expand All @@ -42,6 +42,8 @@ def main(code, number, daemon):
computer_created = False
code_created = False

echo.echo(f'Running on profile {get_manager().get_profile().name}')

if not code:
label = f'benchmark-{uuid.uuid4().hex[:8]}'
computer = orm.Computer(
Expand Down
5 changes: 3 additions & 2 deletions docs/source/topics/performance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,11 @@ Benchmarks

The :download:`benchmark script <../howto/include/scripts/performance_benchmark_base.py>` :fa:`download` provides a basic way of assessing performance of the workflow engine that involves all components (CPU, file system, postgresql, rabbitmq).

It launches 100 ``ArithmeticAddCalculation`` jobs on the localhost and measures the time until completion.
It launches ``ArithmeticAddCalculation``s on the localhost and measures the time until completion.
Since the workload of the ``ArithmeticAddCalculation`` (summing two numbers) completes instantly, the time per process is a reasonable measure of the overhead incurred from the workflow engine.

The numbers reported in the :ref:`howto section<how-to:installation:performance>` were obtained using a single daemon worker and can be reduced by increasing the number of daemon workers:
The numbers reported in the :ref:`howto section<how-to:installation:performance>` were obtained by running the processes in the current shell, which is the default.
The ``--daemon`` option can be used to run the calculations through the AiiDA daemon instead, and to look at parallelizing over multiple daemon workers:

.. table::
:widths: auto
Expand Down