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