Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1653834

Summary: [OSP16][RFE][Deployment][TechPreview] Ability to manage KSM service and have it disabled per default
Product: Red Hat OpenStack Reporter: Chris Fields <cfields>
Component: openstack-tripleo-heat-templatesAssignee: Martin Schuppert <mschuppe>
Status: CLOSED CURRENTRELEASE QA Contact: Gurenko Alex <agurenko>
Severity: high Docs Contact:
Priority: high    
Version: 15.0 (Stein)CC: aschultz, ccopello, cswanson, egallen, emacchi, hakhande, hbrock, jamsmith, jslagle, kchamart, lyarwood, marjones, mburns, mschuppe, supadhya, vkhitrin
Target Milestone: z2Keywords: FutureFeature, TechPreview, TestOnly, Triaged, ZStream
Target Release: 16.0 (Train on RHEL 8.1)   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-11.3.2-0.20200219061444.a1824a3.el8ost Doc Type: Enhancement
Doc Text:
This enhancement adds the Boolean parameter `NovaComputeEnableKsm`. The parameter enables the ksm and ksmtuned service on compute nodes. You can set `NovaComputeEnableKsm` for each Compute role. The default value is`False`.
Story Points: ---
Clone Of:
: 1665520 1782217 (view as bug list) Environment:
Last Closed: 2020-02-19 09:22:45 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:    
Bug Blocks: 1665520, 1782217    

Description Chris Fields 2018-11-27 17:41:58 UTC
Description of problem:
KSM enabled on overcloud images conflicts with the tuned cpu-partitioning profile for NFV configurations.  See https://bugzilla.redhat.com/show_bug.cgi?id=1622252.  This issue was discussed in the 11/27 NFV DFG Status meeting where it was agreed that ksm has little benefit in overcloud nodes and should be masked off in OSP 15 and onward.  Proposed solution is that overcloud images should have the 'ksm' and 'ksmtuned' service masked as in: systemctl mask ksm ksmtuned

Version-Release number of selected component (if applicable):
OSP 15

How reproducible:

The issue is not reproducible consistently but occurs roughly one time in four on the customer's system.

Steps to Reproduce:
1. Boot the compute node repeatedly until the issue occurs

Actual results:

cpu-partitioning profile is occasionally not applied and is rolled back leading to compute nodes without the appropriate tuning in place

Expected results:

cpu-partitioning applied

Additional info:

This issue was discovered during testing for an upgrade to OSP10z8 with OVS 2.9 where RHEL was also upgraded from RHEL 7.4 to RHEL 7.5

Additional info:
Need to add to release notes:

"In previous overcloud images the ksm and ksmtuned services were enabled by default.  In OSP 15 and onward these services will be disabled by default."

Comment 2 Kashyap Chamarthy 2019-01-11 15:17:25 UTC
Based on tihs description, this request sounds to me to disable KSM (Kernel Same-page Merging) on the OverCloud images on OSP 15.

---

More useful context in the 'tuned' bug here: https://bugzilla.redhat.com/show_bug.cgi?id=1622239

And the commit in the 'tuned' profile: https://github.com/redhat-performance/tuned/commit/1b80d4eac24eca5aefb0926d8f2696caa2257c22


[...]

Comment 3 Martin Schuppert 2019-01-23 14:17:13 UTC
Just a note, /usr/lib/systemd/system/ksm.service and /usr/lib/systemd/system/ksmtuned.service are part of qemu-kvm-common-rhev, which is not part of the overcloud image in OSP14+ (at least at the moment)

We have it in OSP10 and 13:
[root@compute-0 ~]# ps -ef |grep ksm
root          37       2  0 Jan18 ?        00:00:00 [ksmd]
root        3103       1  0 Jan18 ?        00:00:04 /bin/bash /usr/sbin/ksmtuned
root      658868   29430  0 09:16 pts/0    00:00:00 grep --color=auto ksm

Comment 4 Martin Schuppert 2019-02-28 07:46:55 UTC
As mentioned in comment3 the ksm services are per default not part of the overcloud images in OSP14+ . [1] introduced a role parameter NovaComputeEnableKsm with which the ksm services can be enabled per compute role:

parameter_defaults:
    ComputeParameters:
        NovaComputeEnableKsm: True
    ComputeRealTimeParameters:
        NovaComputeEnableKsm: False

[1] https://review.openstack.org/631021

Comment 11 Martin Schuppert 2020-02-19 09:22:45 UTC
Closing this out as full support testing for OSP16 is tracked in https://bugzilla.redhat.com/show_bug.cgi?id=1782217