Description of problem:
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
But according to the 03-ksm.policy file, sleep_millisecs can go bellow that value:
49 (Host.Control "ksm_sleep_millisecs"
50 (/ (* ksm_sleep_ms_baseline 16777216) Host.mem_available))
Causing system with, let's say 256GB of RAM, to have sleep_millisecs set to 0:
2015-08-25 16:57:53,118 - mom.Controllers.KSM - INFO - Updating KSM configuration: pages_to_scan:600 run:1 sleep_millisecs:0
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Stress VMs memory in a host with 256GB of RAM or more.
sleep_millisecs set to 0, causing ksmd process to run without interruption, consuming a very high amount of CPU time:
PID USER PR NI VIRT RES SHR %CPU S %MEM TIME+ COMMAND
262 root 25 5 0 0 0 73.4 R 0.0 5126049h ksmd
Limit sleep_millisecs to minimum 10.
Is there a way to reload modified file /etc/vdsm/mom.d/03-ksm.policy without restarting vdsmd?
on 3.6 you just need to restart vdsm-mom service. There is no simple way on 3.5 unless you enabled the RPC port that is disabled by default (because it is unprotected).
try to verify on: vdsm-4.17.10-5.el7ev.noarch
couldn't verify because that patch is missing from that version.
can you please ensure it's available for 3.6.1?
Already merged to the right VDSM branch.
moving back to modified because the patch didn't enter the latest version yet.
details of the latest verion i tried to verify on :
Red Hat Enterprise Virtualization Manager Version: 126.96.36.199-0.1.el6
verified on :
1. create a virtual host with (virtual) 256GB :
(if you have an host with 256GB you can skip this step)
have a nested environment in order to
crate a VM that will be a host in your setup
in the nested environment, create a new cluster policy
which the memory filter is disabled
(the right up corner -> configure -> cluster policy)
go to clusters tab -> choose your cluster ->
in the cluster policy -> choose the cluster policy that you created
disable memory overcommited on the nested host
add the following line in the file
/etc/sysctl.conf : vm.overcommit_memory = 1
power of the vm (nested host)
edit the vm ( your nested host) - > set the memory to 262144
start the vm
2. Triggered KSM
3. see that the ksmd process is not taking a high amount of CPU-
run `ps -fade | grep ksmd` - and check that CPU is not unusual
4. in /var/log/vdsm/mom.log, when ksm triggered you should
see that:run != 0 and the millisec always bigger than 10
log results should look like this
: /var/log/vdsm/mom.log: 2015-11-05 15:46:26,923 - mom.Controllers.KSM - INFO - Updating KSM configuration: pages_to_scan:64 run:1 sleep_millisecs:10
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.