Bug 1025780

Summary: Cannot disable KSM
Product: Red Hat Enterprise Virtualization Manager Reporter: Amador Pahim <asegundo>
Component: vdsmAssignee: Amador Pahim <asegundo>
Status: CLOSED ERRATA QA Contact: Lukas Svaty <lsvaty>
Severity: high Docs Contact:
Priority: medium    
Version: 3.3.0CC: acathrow, asegundo, bazulay, dfediuck, iheim, knesenko, lpeer, mavital, milan.zelenka, msivak, srevivo, yeylon
Target Milestone: ---Keywords: Triaged
Target Release: 3.3.0   
Hardware: All   
OS: Linux   
Whiteboard: sla
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Users can now use the "ksmEnabled" parameter on vdsClient to enable or disable Kernel Samepage Merging (KSM) control by the Memory Overcommit Manager (MOM). By default, KSM is enabled.
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-21 16:19:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: SLA RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1020228, 1026980    

Description Amador Pahim 2013-11-01 14:44:18 UTC
Description of problem:

Up to RHEV 3.2, KSM was controlled by ksmtuned. Users wanting stop KSM just wanted to stop ksmtuned service.

In RHEV 3.3, vdsm stops ksmtuned and gives KSM control to MOM. MOM controls KSM and memory ballooning. 

We can disable memory ballooning using RHEV Admin Portal interface, unchecking "Enable Memory Balloon Optimization" in Cluster level, which will have effect in next Host "Up", or using emergencial vdsClient on the Hypervisor:

# vdsClient -s 0 setMOMPolicyParameters balloonEnabled=False

Please provide an equivalent way to disable KSM in RHEV 3.3.

Comment 8 Lukas Svaty 2013-12-17 10:26:36 UTC
can you provide any information how to test this?

Comment 9 Martin Sivák 2013-12-17 10:30:54 UTC
vdsClient -s 0 setMOMPolicyParameters ksmEnabled=False

This command should disable KSM. You can  then use MoM's xml-rpc, call getPolicy() and check if the ksmEnabled variable is indeed set to False. There will be two parts - (defvar ksmEnabled True) as a default and (set ksmEnabled False) representing the updated value.

Comment 10 Martin Sivák 2013-12-17 10:32:52 UTC
Also please make sure that the value is still there when you subsequently call setMOMPolicyParameters with only balloonEnabled=False.

In other words:

vdsClient -s 0 setMOMPolicyParameters ksmEnabled=False
vdsClient -s 0 setMOMPolicyParameters balloonEnabled=False

should give you the same result as

vdsClient -s 0 setMOMPolicyParameters ksmEnabled=False balloonEnabled=False

Comment 11 Lukas Svaty 2013-12-17 10:39:36 UTC
thanks Martin,
tested in is28 moving to VERIFIED

Comment 12 Lukas Svaty 2013-12-17 10:40:47 UTC
*is27, sorry typo

Comment 13 errata-xmlrpc 2014-01-21 16:19:51 UTC
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.

http://rhn.redhat.com/errata/RHBA-2014-0040.html