nv_ingest_api.util.system package#
Submodules#
nv_ingest_api.util.system.hardware_info module#
- class nv_ingest_api.util.system.hardware_info.SystemResourceProbe(hyperthread_weight: float = 0.75)[source]#
Bases:
object
Detects the effective CPU core count available to the current process, optionally applying a weighting factor for hyperthreads (SMT).
It attempts to reconcile information from: 1. Linux Cgroup v2 CPU limits (cpu.max) 2. Linux Cgroup v1 CPU limits (cpu.cfs_quota_us, cpu.cfs_period_us) 3. OS scheduler affinity (os.sched_getaffinity) 4. OS reported CPU counts (psutil.cpu_count for logical/physical)
Prioritizes Cgroup quota limits. If the limit is based on core count (affinity/OS), it applies hyperthreading weight if psutil provides physical/logical counts.