diff --git a/NEWS b/NEWS index 652c6eeec0b9c6204d3dd69a0adc3bdd5e0dd41e..d566617ca603f8869e4950364b05997c5c000bf0 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,7 @@ Enhancements and new features: * Refactor InfluxDB (API is now stable) #1166 * Remove graph export from Glances #1206 * Add a code of conduct for Glances project's participants #1211 + * Context switches bottleneck identification #1212 Bugs corrected: diff --git a/conf/glances.conf b/conf/glances.conf index 466ed8512ea948f0d418da5c42a419ee4d5ac721..fc06547fe6b92e31c4e5b947ba3a9dfdee494053 100644 --- a/conf/glances.conf +++ b/conf/glances.conf @@ -49,13 +49,13 @@ steal_careful=50 steal_warning=70 steal_critical=90 #steal_log=True -# I/O wait percentage should be lower than 1/# (of CPU cores) +# I/O wait percentage should be lower than 1/# (Logical CPU cores) # Leave commented to just use the default config (1/#-20% / 1/#-10% / 1/#) #iowait_careful=30 #iowait_warning=40 #iowait_critical=50 # Context switch limit (core / second) -# Leave commented to just use the default config (critical is 56000/# (of CPU core)) +# Leave commented to just use the default config (critical is 50000*# (Logical CPU cores) #ctx_switches_careful=10000 #ctx_switches_warning=12000 #ctx_switches_critical=14000 diff --git a/glances/config.py b/glances/config.py index 20a43ba2569e70a390a186f27c47b8e5b729a5b4..78975fcda5e9f84881fb264f8b5c82c4977af91d 100644 --- a/glances/config.py +++ b/glances/config.py @@ -172,7 +172,8 @@ class Config(object): [str(iowait_bottleneck - (iowait_bottleneck * 0.20)), str(iowait_bottleneck - (iowait_bottleneck * 0.10)), str(iowait_bottleneck)]) - ctx_switches_bottleneck = 56000 / multiprocessing.cpu_count() + # Context switches bottleneck identification #1212 + ctx_switches_bottleneck = (500000 * 0.10) * multiprocessing.cpu_count() self.set_default_cwc('cpu', 'ctx_switches', [str(ctx_switches_bottleneck - (ctx_switches_bottleneck * 0.20)), str(ctx_switches_bottleneck - (ctx_switches_bottleneck * 0.10)),