From 9d3aeeb59da90a953b9cbb97b5d42212ef8b2edc Mon Sep 17 00:00:00 2001 From: Oliver Sanders Date: Mon, 20 Jan 2025 11:35:04 +0000 Subject: [PATCH] doc: improve run host ranking docs --- cylc/flow/cfgspec/globalcfg.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cylc/flow/cfgspec/globalcfg.py b/cylc/flow/cfgspec/globalcfg.py index 18570a65c3..7ca7372e44 100644 --- a/cylc/flow/cfgspec/globalcfg.py +++ b/cylc/flow/cfgspec/globalcfg.py @@ -843,6 +843,11 @@ def default_for( Conf('ranking', VDR.V_STRING, desc=f''' Rank and filter run hosts based on system information. + By default, when a workflow is started, Cylc will pick a host + for it to run on at random from :cylc:conf:`[..]available`. + If no hosts are specified in :cylc:conf:`[..]available` it + will start the scheduler locally. + Ranking can be used to provide load balancing to ensure no single run host is overloaded. It also provides thresholds beyond which Cylc will not attempt to start new schedulers on @@ -867,6 +872,11 @@ def default_for( # rank hosts by 15min average of server load getloadavg()[2] + # rank hosts by the amount of available RAM (multiply by -1 + # to make it choose the host with the most available memory + # rather than the least) + -1 * virtual_memory().available + # rank hosts by the number of cores # (multiple by -1 because the lowest value is chosen) -1 * cpu_count()