mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-05 06:23:03 +00:00
Only enable the memory controller in cgroup subtree_control instead of all available controllers. cpu.stat is available in cgroup v2 without enabling the cpu controller (base accounting), and enabling io/pids/cpu controllers adds unnecessary per-operation kernel overhead to Scylla processes - particularly the memory controller's per-page-cache-operation accounting combined with io controller overhead during heavy I/O. Additionally, restrict SystemResourceMonitor to the master process only. System-wide metrics (CPU%, memory) are identical from any process, so running a monitoring thread in each xdist worker was redundant and added unnecessary SQLite write contention and thread scheduling noise. Replace cpu_percent(interval=0.1) with a non-blocking cpu_percent() that returns CPU% since the previous call. Use stop_event.wait(timeout=2.0) as the loop control to both space out iterations and allow immediate shutdown responsiveness. Fixes SCYLLADB-2141 Closes scylladb/scylladb#29987 * github.com:scylladb/scylladb: test: use non-blocking cpu_percent in SystemResourceMonitor test.py: reduce cgroup overhead in resource metrics gathering