Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
guest boots slowly when ksm service is running. it took more than 5 mins to get response from QMP port, while booting guest with '-m 800G'.
and the processes status are:
---------------------------------------------------------------------
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
315 root 25 5 0 0 0 R 95.2 0.0 1:06.57 ksmd
3082 root 20 0 80.6g 151m 4828 D 4.3 0.1 0:00.28 qemu-kvm
Version-Release number of selected component (if applicable):
qemu-kvm-rhev-0.12.1.2-2.443.el6.x86_64
How reproducible:
100%
Steps to Reproduce:
1. start ksm service and boot guest with following script.
#!/bin/bash
/usr/libexec/qemu-kvm \
-M rhel6.6.0 \
-nodefaults \
-chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/monitor-ksm,server,nowait \
-mon chardev=qmp_id_qmpmonitor1,mode=control \
-m 81920 \
-smp 4,maxcpus=4,cores=4,threads=1,sockets=1 \
-cpu 'Westmere' \
-vnc :0 \
-enable-kvm &
sleep 1
top -p `pgrep qemu-kvm`
time nc -U /tmp/monitor-ksm << EOF >/dev/null
{'execute': 'qmp_capabilities'}
{'execute': 'quit'}
EOF
2. stop ksm service and boot guest with above script again.
Actual results:
ksm is running:
-----------------
real 0m15.243s
user 0m0.527s
sys 0m0.322s
ksm is stoped:
----------------
real 0m0.144s
user 0m0.582s
sys 0m0.359s
Expected results:
Additional info:
Created attachment 934029[details]
strace log
sorry, the script in comment 0 should not have this line:
top -p `pgrep qemu-kvm`
some of the brk() syscall took too much time
21:57:21.874232 brk(0x7ff3731ee000) = 0x7ff3731ee000 <0.000033>
21:57:21.874556 brk(0x7ff373211000) = 0x7ff373211000 <0.388917> <--
21:57:22.263789 brk(0x7ff373234000) = 0x7ff373234000 <0.000015>
21:57:22.264092 brk(0x7ff373257000) = 0x7ff373257000 <0.000015>
As ksmd eating CPU usually turns out to be configuration problems, I'm treating this BZ as a low-priority one. In this case I'm moving it to 6.8, as we're past development deadline for 6.7.
(In reply to Luiz Capitulino from comment #3)
> Do you have ksmtuned installed and running?
Seems, no.
Anyway, I checked the status of ksm and ksmtuned with a new installed host:
# chkconfig --list | grep ksm
ksm 0:off 1:off 2:off 3:on 4:on 5:on 6:off
ksmtuned 0:off 1:off 2:off 3:on 4:on 5:on 6:off
# service ksm status
ksm is not running
# service ksmtuned status
ksmtuned is stopped
So, started ksmtuned manually, then boot a guest with allocating 80G memory will get a regular duration(in this case ksm would not be triggered).
# sh ksm.sh
real 0m0.122s
user 0m0.592s
sys 0m0.414s
Description of problem: guest boots slowly when ksm service is running. it took more than 5 mins to get response from QMP port, while booting guest with '-m 800G'. and the processes status are: --------------------------------------------------------------------- PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 315 root 25 5 0 0 0 R 95.2 0.0 1:06.57 ksmd 3082 root 20 0 80.6g 151m 4828 D 4.3 0.1 0:00.28 qemu-kvm Version-Release number of selected component (if applicable): qemu-kvm-rhev-0.12.1.2-2.443.el6.x86_64 How reproducible: 100% Steps to Reproduce: 1. start ksm service and boot guest with following script. #!/bin/bash /usr/libexec/qemu-kvm \ -M rhel6.6.0 \ -nodefaults \ -chardev socket,id=qmp_id_qmpmonitor1,path=/tmp/monitor-ksm,server,nowait \ -mon chardev=qmp_id_qmpmonitor1,mode=control \ -m 81920 \ -smp 4,maxcpus=4,cores=4,threads=1,sockets=1 \ -cpu 'Westmere' \ -vnc :0 \ -enable-kvm & sleep 1 top -p `pgrep qemu-kvm` time nc -U /tmp/monitor-ksm << EOF >/dev/null {'execute': 'qmp_capabilities'} {'execute': 'quit'} EOF 2. stop ksm service and boot guest with above script again. Actual results: ksm is running: ----------------- real 0m15.243s user 0m0.527s sys 0m0.322s ksm is stoped: ---------------- real 0m0.144s user 0m0.582s sys 0m0.359s Expected results: Additional info: