Bug 1008500 - [TestOnly] Allow enable/disable ksm per VM
[TestOnly] Allow enable/disable ksm per VM
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt (Show other bugs)
All Linux
low Severity medium
: rc
: ---
Assigned To: Libvirt Maintainers
Virtualization Bugs
: TestOnly
Depends On: 635418 LibvirtKSMOff 769021 950968
Blocks: 655920 635417 644849
  Show dependency treegraph
Reported: 2013-09-16 09:35 EDT by Paolo Bonzini
Modified: 2015-09-27 22:10 EDT (History)
15 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: LibvirtKSMOff
Last Closed: 2014-06-13 06:52:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Comment 1 Wayne Sun 2013-11-19 06:24:59 EST

1. Add the following xml info into guest 
2. Start the guest
# virsh start r7q
Domain r7q started

# ps aux|grep r7q
qemu     17219 95.8  0.0 1477604 61088 ?       Sl   19:04   0:05 /usr/libexec/qemu-kvm -name r7q -S -machine pc-i440fx-rhel7.0.0,accel=kvm,usb=off,mem-merge=off -m 977 -realtime mlock=off -smp 2,maxcpus=4,sockets=4,cores=1,threads=1 -uuid f8de2e07-3fdc-5425-6c72-30d400fb0679 -no-user-config -nodefaults -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/r7q.monitor,server,nowait -mon chardev=charmonitor,id=monitor,mode=control -rtc base=utc -no-shutdown -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=/var/lib/libvirt/images/r7q-mjc.img,if=none,id=drive-virtio-disk0,format=qcow2 -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x7,drive=drive-virtio-disk0,id=virtio-disk0,bootindex=1 -netdev tap,fd=23,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=52:54:00:37:28:f5,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=serial0 -vnc -vga cirrus -device AC97,id=sound0,bus=pci.0,addr=0x4 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5

the mem-merge=off is added to qemu command line. 

remove the adding xml and restart, no mem-merge added to command line which is default to mem-merge=on

After enable ksm on host:

1.echo 1 > /sys/kernel/mm/ksm/run
2.echo 50 > /sys/kernel/mm/ksm/sleep_millisecs
3.echo 5000 > /sys/kernel/mm/ksm/pages_to_scan

check with steps with comments #7 in bug 769021, also works as expected.
Comment 3 Ludek Smid 2014-06-13 06:52:15 EDT
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.

Note You need to log in before you can comment on or make changes to this bug.