myxce/src/configs/limits.yaml
Rongsong Shen a8fb768526
fix(config): night_mem_pct's percent value was 100x too large (bug-1832)
night_mem_pct (resname: mem, percent: true) had value: 50, but
xce_limit_val_t.val is a 0-1 fraction convention when percent is set,
not a 0-100 number (see bug-1831 for the full pipeline trace). As
configured, its actual capacity computed as 50x (5000%) the resource's
current value -- a cap that could never realistically be exceeded by
any actual demand, making this limit functionally dead in any real
deployment.

night_mem_pct was authored directly in YAML for a docs/example config
with no C-literal ancestry to cross-check against, unlike limits2
(migrated verbatim from a hand-written C literal .val = 0.2 for a
documented "20% mem cap") -- it used the human-intuitive but incorrect
0-100 scale instead.

Changed value: 50 to 0.5. This is a real behavior change, not just a
display fix: night_mem_pct will now actually constrain the night
queue's mem usage at 50% for the first time in any deployment using
this config.

Discovered during live manual verification of scheduler-sim-diagnostics
Requirement 6 against a real deployed cluster.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RLSNJhNoULvVcUhXEFafQC
2026-09-20 10:00:30 +00:00

95 lines
2.4 KiB
YAML

---
limits:
# cap total slots for ug1 across the whole cluster
- name: ug1_slots
users:
members:
- ug1
resname: slots
value: 10
# per-user slot cap inside ug2 (each member gets up to 4, not a shared pool)
- name: ug2_slots_per_user
users:
members:
- ug2
exclude_members:
- user3
resname: slots
value: 4
per_user: true
# queue-scoped memory cap, percentage of currently-available mem resource
# (bug-1831: percent-based value is a 0-1 fraction, not a 0-100 number --
# 0.5 = 50%, matching the convention limit2/limits2's original hardcoded
# C literal established; the previous "value: 50" here silently computed
# 5000% of the resource, a cap that could never actually bind)
- name: night_mem_pct
queues:
members:
- night
resname: mem
value: 0.5
percent: true
# host-scoped cap, applied per host in hg1
- name: hg1_slots_per_host
hosts:
members:
- hg1
resname: slots
value: 20
per_host: true
# combined scope: ug1 members on the normal queue
- name: ug1_normal_slots
users:
members:
- ug1
queues:
members:
- normal
resname: slots
value: 8
# migrated from src/controller/sched.c xcesched_push_configs()'s
# hardcoded limit1_config literal (all users except rshen, shared
# 3-slot cap)
- name: limit1
users:
members:
- all
exclude_members:
- rshen
resname: slots
value: 3.0
# global cap on ug1's total mem requested across the whole cluster
# (bug-1790 regression coverage: a GLOBAL limit on a per-host resource
# OTHER than "slots" -- exercises calc_wanted_host_resval_job_totals()'s
# generalization of bug-1789's fix to any per-host resource, proven live
# rather than left as untested config)
- name: ug1_global_mem
users:
members:
- ug1
resname: mem
value: 5000000000
# migrated from src/controller/sched.c xcesched_push_configs()'s
# hardcoded limit2_config literal (rshen on the xce queue, per-user/
# per-queue/per-project/per-host 20% mem cap)
- name: limits2
per_user: true
per_queue: true
per_project: true
per_host: true
users:
members:
- rshen
queues:
members:
- xce
resname: mem
value: 0.2
percent: true