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

doc: add example on configuring priorities for queues #542

Merged
merged 1 commit into from
Nov 25, 2024
Merged
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
48 changes: 48 additions & 0 deletions doc/guide/accounting-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,54 @@ Both "types" of jobs, *running* and *active*, are based on Flux's definitions
of job states_. *Active* jobs can be in any state but INACTIVE. *Running* jobs
are jobs in either RUN or CLEANUP states.

Queue Priority Calculation Configuration
========================================

Mentioned above, the queue that a job is submitted under can influence its
calculated priority. Priorities specific to queues can be configured in the
flux-accounting database when they are first added:

.. code-block:: console

$ flux account add-queue bronze --priority=100

Or changed later on:

.. code-block:: console

$ flux account edit-queue bronze --priority=500

If a priority is not specified when a queue is added, it will have a priority
of 0, meaning it will not positively or negatively affect a job's integer
priority.

example
-------

Given an association with a fair-share value of 0.5, the priority plugin loaded
and configured to just use its default factor weights, let's walk through how a
job's priority could be affected by running under certain queues. Assume the
following configuration for queues and their associated priorities:

+-------------+----------+
| queue | priority |
+=============+==========+
| bronze | 100 |
+-------------+----------+
| silver | 300 |
+-------------+----------+
| gold | 500 |
+-------------+----------+

If the association submitted their job with default urgency in the ``bronze``
queue, their priority would be:

:math:`P = (0.5 \times 100000) + (100 \times 10000) + (16 - 16) = (50000) + (1000000) = 1050000`

versus this same job submitted in the ``gold`` queue:

:math:`P = (0.5 \times 100000) + (500 \times 10000) + (16 - 16) = (50000) + (5000000) = 5050000`

.. _glossary-section:

********
Expand Down
Loading