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.

Bug 1498148

Summary: realtime-virtual-host: disable ksm
Product: Red Hat Enterprise Linux 7 Reporter: Luiz Capitulino <lcapitulino>
Component: tunedAssignee: Luiz Capitulino <lcapitulino>
Status: CLOSED ERRATA QA Contact: Tereza Cerna <tcerna>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.5CC: jeder, jskarvad, olysonek, ovasik, pezhang, tcerna
Target Milestone: rcKeywords: Patch, Upstream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: tuned-2.9.0-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-04-10 16:07:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1467576    
Bug Blocks: 1240765    

Description Luiz Capitulino 2017-10-03 14:43:20 UTC
Description of problem:

KSM is enabled by default when the qemu-kvm-common-rhev package is installed. Its execution is controlled by a service called ksmtuned. Although ksmtuned will only run ksm when qemu's memory consumption reaches a certain threshold (which I don't know if it accounts for hugeTLB pages) we should disable KSM not run in the risk of getting latency spikes.


Version-Release number of selected component (if applicable): tuned-2.8.0-5.el7.noarch


How reproducible:


Steps to Reproduce:
1. Boot a KVM-RT host
2. Run "systemctl status ksmtuned", if this is running then it's enabled

Comment 2 Luiz Capitulino 2017-10-05 18:31:13 UTC
Posted series downstream a few days ago. I can upload it here if needed.

Comment 6 Tereza Cerna 2018-01-15 11:50:36 UTC
======================================================
Verified in:
    tuned-2.9.0-1.el7.noarch
    tuned-profiles-cpu-partitioning-2.9.0-1.el7.noarch
    tuned-profiles-nfv-host-2.9.0-1.el7.noarch
PASS
======================================================

# systemctl status ksm ksmtuned
● ksm.service - Kernel Samepage Merging
   Loaded: loaded (/usr/lib/systemd/system/ksm.service; enabled; vendor preset: enabled)
   Active: active (exited) since Mon 2018-01-15 10:30:20 CET; 188s ago
● ksmtuned.service - Kernel Samepage Merging (KSM) Tuning Daemon
   Loaded: loaded (/usr/lib/systemd/system/ksmtuned.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2018-01-15 10:30:20 CET; 188s ago

# tuned-adm profile cpu-partitioning

# systemctl status ksm ksmtuned
● ksm.service - Kernel Samepage Merging
   Loaded: loaded (/usr/lib/systemd/system/ksm.service; disabled; vendor preset: enabled)
   Active: inactive (dead)
● ksmtuned.service - Kernel Samepage Merging (KSM) Tuning Daemon
   Loaded: loaded (/usr/lib/systemd/system/ksmtuned.service; disabled; vendor preset: enabled)
   Active: inactive (dead)

>> Services ksm and ksmtuned are disabled and inactive.

# tuned-adm profile balanced

# systemctl status ksm ksmtuned
● ksm.service - Kernel Samepage Merging
   Loaded: loaded (/usr/lib/systemd/system/ksm.service; enabled; vendor preset: enabled)
   Active: active (exited) since Mon 2018-01-15 10:48:38 CET; 3s ago
● ksmtuned.service - Kernel Samepage Merging (KSM) Tuning Daemon
   Loaded: loaded (/usr/lib/systemd/system/ksmtuned.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2018-01-15 10:48:38 CET; 3s ago

>> Services ksm and ksmtuned are enabled and started again.

======================================================
Reproduced in:
    tuned-2.8.0-5.el7.noarch
    tuned-profiles-cpu-partitioning-2.8.0-5.el7.noarch
    tuned-profiles-nfv-host-2.8.0-5.el7.noarch
FAIL
======================================================

# systemctl status ksm ksmtuned
● ksm.service - Kernel Samepage Merging
   Loaded: loaded (/usr/lib/systemd/system/ksm.service; enabled; vendor preset: enabled)
   Active: active (exited) since Mon 2018-01-15 10:48:38 CET; 1h 59min ago
● ksmtuned.service - Kernel Samepage Merging (KSM) Tuning Daemon
   Loaded: loaded (/usr/lib/systemd/system/ksmtuned.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2018-01-15 10:48:38 CET; 1h 59min ago

# tuned-adm profile cpu-partitioning

# systemctl status ksm ksmtuned
● ksm.service - Kernel Samepage Merging
   Loaded: loaded (/usr/lib/systemd/system/ksm.service; enabled; vendor preset: enabled)
   Active: active (exited) since Mon 2018-01-15 10:48:38 CET; 1h 59min ago
● ksmtuned.service - Kernel Samepage Merging (KSM) Tuning Daemon
   Loaded: loaded (/usr/lib/systemd/system/ksmtuned.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2018-01-15 10:48:38 CET; 1h 59min ago

>> Services ksm and ksmtuned should be disabled and inactive and it is not true. FAIL.

Comment 11 errata-xmlrpc 2018-04-10 16:07:06 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.

https://access.redhat.com/errata/RHBA-2018:0879