mirror of https://github.com/nicolargo/glances
Improve default configuration for ctx_switches
parent
4934d78d8e
commit
4613342019
|
@ -25,12 +25,12 @@ steal_warning=70
|
||||||
steal_critical=90
|
steal_critical=90
|
||||||
#steal_log=True
|
#steal_log=True
|
||||||
# I/O wait percentage should be lower than 1/# (of CPU cores)
|
# I/O wait percentage should be lower than 1/# (of CPU cores)
|
||||||
# Let blanck to default config (1/#-20% / 1/# / 1/#+20%)
|
# Let commented for default config (1/#-20% / 1/#-10% / 1/#)
|
||||||
#iowait_careful=20
|
#iowait_careful=30
|
||||||
#iowait_warning=25
|
#iowait_warning=40
|
||||||
#iowait_critical=30
|
#iowait_critical=50
|
||||||
# Context switch limit per core / second
|
# Context switch limit (core / second)
|
||||||
# For example, if you have 2 Core, critical limit will be 28000/sec
|
# Let commented for default config (critical is 56000/# (of CPU core))
|
||||||
ctx_switches_careful=10000
|
ctx_switches_careful=10000
|
||||||
ctx_switches_warning=12000
|
ctx_switches_warning=12000
|
||||||
ctx_switches_critical=14000
|
ctx_switches_critical=14000
|
||||||
|
|
|
@ -134,8 +134,12 @@ class Config(object):
|
||||||
# By default I/O wait should be lower than 1/number of CPU cores
|
# By default I/O wait should be lower than 1/number of CPU cores
|
||||||
iowait_bottleneck = (1.0 / multiprocessing.cpu_count()) * 100.0
|
iowait_bottleneck = (1.0 / multiprocessing.cpu_count()) * 100.0
|
||||||
self.set_default('cpu', 'iowait_careful', str(iowait_bottleneck - (iowait_bottleneck * 0.20)))
|
self.set_default('cpu', 'iowait_careful', str(iowait_bottleneck - (iowait_bottleneck * 0.20)))
|
||||||
self.set_default('cpu', 'iowait_warning', str(iowait_bottleneck))
|
self.set_default('cpu', 'iowait_warning', str(iowait_bottleneck - (iowait_bottleneck * 0.10)))
|
||||||
self.set_default('cpu', 'iowait_critical', str(iowait_bottleneck + (iowait_bottleneck * 0.20)))
|
self.set_default('cpu', 'iowait_critical', str(iowait_bottleneck))
|
||||||
|
ctx_switches_bottleneck = 56000 / multiprocessing.cpu_count()
|
||||||
|
self.set_default('cpu', 'ctx_switches_careful', str(ctx_switches_bottleneck - (ctx_switches_bottleneck * 0.20)))
|
||||||
|
self.set_default('cpu', 'ctx_switches_warning', str(ctx_switches_bottleneck - (ctx_switches_bottleneck * 0.10)))
|
||||||
|
self.set_default('cpu', 'ctx_switches_critical', str(ctx_switches_bottleneck))
|
||||||
|
|
||||||
# Per-CPU
|
# Per-CPU
|
||||||
if not self.parser.has_section('percpu'):
|
if not self.parser.has_section('percpu'):
|
||||||
|
|
Loading…
Reference in New Issue