Change in vdsm[ovirt-3.6]: Limit sleep_millisecs to minimum 10

msivak at redhat.com msivak at redhat.com
Thu Oct 29 10:18:47 UTC 2015


Martin Sivák has uploaded a new change for review.

Change subject: Limit sleep_millisecs to minimum 10
......................................................................

Limit sleep_millisecs to minimum 10

According to the former KSM controller, ksmtuned, 10 should be the
minimum value for sleep_millisecs:

  48 sleep=$[KSM_SLEEP_MSEC * 16 * 1024 * 1024 / total]
  49 [ $sleep -le 10 ] && sleep=10      <---- 10 is the minimum
  50 debug sleep $sleep

Systems with a low sleep_millisecs number will run ksmd daemon without
interruption, causing a very high cpu time consumption.

This patch limits sleep_millisecs to the minimum of 10.

Bug-Url: http://bugzilla.redhat.com/1256949
Change-Id: I7412ca576089f1dae2441ec39f72e7a94b3c8fc9
Signed-off-by: Amador Pahim <apahim at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/45332
Continuous-Integration: Jenkins CI
Reviewed-by: Martin Sivák <msivak at redhat.com>
Reviewed-by: Douglas Schilling Landgraf <dougsland at redhat.com>
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
(cherry picked from commit 1cd2b7b36e550afa56e8773e68153665d3bbd2a0)
---
M vdsm/mom.d/03-ksm.policy
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/35/47835/1

diff --git a/vdsm/mom.d/03-ksm.policy b/vdsm/mom.d/03-ksm.policy
index eaa4aae..55c7c5f 100644
--- a/vdsm/mom.d/03-ksm.policy
+++ b/vdsm/mom.d/03-ksm.policy
@@ -106,7 +106,8 @@
     {        # else
         (Host.Control "ksm_run" 1)
         (Host.Control "ksm_sleep_millisecs"
-            (/ (* ksm_sleep_ms_baseline 16777216) Host.mem_available))
+            (max 10 (/ (* ksm_sleep_ms_baseline 16777216)
+                       Host.mem_available)))
        (if (< (Host.StatAvg "mem_free") ksm_pressure_threshold)
            (change_npages ksm_pages_boost)
            (change_npages ksm_pages_decay))


-- 
To view, visit https://gerrit.ovirt.org/47835
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7412ca576089f1dae2441ec39f72e7a94b3c8fc9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6
Gerrit-Owner: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Amador Pahim <apahim at redhat.com>


More information about the vdsm-patches mailing list