Bug 1189868
Summary: | Disabling Transparent Hugepages persistently via kernel boot command line not working | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | rlopez |
Component: | tuned | Assignee: | Jaroslav Škarvada <jskarvad> |
Status: | CLOSED ERRATA | QA Contact: | Tereza Cerna <tcerna> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.2 | CC: | jeder, jscotka, jskarvad, rhack, rlopez, tcerna, vcojot |
Target Milestone: | rc | ||
Target Release: | 7.2 | ||
Hardware: | x86_64 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | tuned-2.5.0-1.el7 | Doc Type: | Bug Fix |
Doc Text: |
Cause:
Previously the transparent_hugepages wasn't handled the optimal way in Tuned.
Consequence:
If user explicitly specified transparent_hugepage settings in kernel command line, the settings could be overwritten by Tuned.
Fix:
Handling of transparent_hugepages was improved in Tuned.
Result:
Kernel boot command line is now checked by Tuned and if transparent_hugepage settings is specified there, the setting from Tuned profile is ignored.
Also transparent_hugepages was removed from the throughput-performance profile, because it is now not needed there.
Finally support for 'madvise' transparent_hugepages setting was added into Tuned.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-19 12:21:17 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: |
Description
rlopez
2015-02-05 16:52:13 UTC
Can you show us /proc/cmdline after you've done this? If that option is there, then this is probably a kernel problem rather than a grub2 related issue. (In reply to Peter Jones from comment #2) > Can you show us /proc/cmdline after you've done this? If that option is > there, then this is probably a kernel problem rather than a grub2 related > issue. Peter, After reboot, # cat /sys/kernel/mm/transparent_hugepage/enabled [always] madvise never # cat /proc/cmdline BOOT_IMAGE=/vmlinuz-3.10.0-123.el7.x86_64 root=UUID=32e374f8-83ba-479e-a4bb-80d4f34516a7 ro rd.lvm.lv=myvg/rootvol vconsole.keymap=us vconsole.font=latarcyrheb-sun16 crashkernel=auto rhgb quiet transparent_hugepage=never (In reply to rlopez from comment #3) > (In reply to Peter Jones from comment #2) > > Can you show us /proc/cmdline after you've done this? If that option is > > there, then this is probably a kernel problem rather than a grub2 related > > issue. > > Peter, > > After reboot, > > # cat /sys/kernel/mm/transparent_hugepage/enabled > [always] madvise never > > # cat /proc/cmdline > BOOT_IMAGE=/vmlinuz-3.10.0-123.el7.x86_64 > root=UUID=32e374f8-83ba-479e-a4bb-80d4f34516a7 ro rd.lvm.lv=myvg/rootvol > vconsole.keymap=us vconsole.font=latarcyrheb-sun16 crashkernel=auto rhgb > quiet transparent_hugepage=never To add, I have another system with RHEL 7.1 and I see it there too. See below. # cat /sys/kernel/mm/transparent_hugepage/enabled [always] madvise never # cat /proc/cmdline BOOT_IMAGE=/vmlinuz-3.10.0-229.el7.x86_64 root=/dev/mapper/myvg-rootvol ro rd.lvm.lv=myvg/rootvol vconsole.keymap=us vconsole.font=latarcyrheb-sun16 crashkernel=auto rhgb quiet transparent_hugepage=never LANG=en_US.UTF-8 This is because of RHEL7's default tuned profile "throughput-performance". Removing it from the tuned profile would prevent tuned from overriding the kernel cmdline option as specified by the user. This change will have no performance impact, as the kernel's default is transparent_hugepages=always and all we are fixing here is to have tuned not override cmdline setting if it were set by the user. Since the kernel enables THP by default, transparent_hugepage=always is redundant in tuned. Verifying there really is only one profile that should be fixed: # rpm -q tuned tuned-2.4.1-1.el7.noarch # grep -ri transparent /usr/lib/tuned/*/*conf /usr/lib/tuned/network-latency/tuned.conf:transparent_hugepages=never /usr/lib/tuned/throughput-performance/tuned.conf:transparent_hugepages=always It's only the throughput-latency profile that we need to fix, because we specifically want THP disabled for network latency sensitive workloads. Patch against upstream tuned: # git diff diff --git a/profiles/throughput-performance/tuned.conf b/profiles/throughput-performance/tuned.conf index 42473a9..4d6c607 100644 --- a/profiles/throughput-performance/tuned.conf +++ b/profiles/throughput-performance/tuned.conf @@ -7,9 +7,6 @@ governor=performance energy_perf_bias=performance min_perf_pct=100 -[vm] -transparent_hugepages=always - [disk] readahead=>4096 Until we ship an errata, the workaround is to create a tuned profile like so: # cat /etc/tuned/thp/tuned.conf [main] include=throughput-performance [vm] transparent_hugepages=never # systemctl restart tuned # cat /proc/cmdline BOOT_IMAGE=/vmlinuz-3.10.0-229.el7.x86_64 root=/dev/mapper/vg0-root ro rd.md=0 rd.dm=0 rd.lvm.lv=vg0/swap console=ttyS0,115200 rd.lvm.lv=vg0/root rd.luks=0 vconsole.keymap=us vconsole.font=latarcyrheb-sun16 audit=0 transparent_hugepage=never # cat /sys/kernel/mm/transparent_hugepage/enabled [always] madvise never # tuned-adm profile thp # cat /sys/kernel/mm/transparent_hugepage/enabled always madvise [never] *** Bug 1195656 has been marked as a duplicate of this bug. *** Upstream commit fixing this issue: https://git.fedorahosted.org/cgit/tuned.git/commit/?id=e2f86d412f598838630b30350a08e5befbad7ea3 It removes transparent_hugepages from throughput-performance profile. It adds check for kernel boot cmdline, if there is transparent_hugepage already set, profile settings are ignored. And finally it adds support for 'madvise' transparent_hugepages setting. 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://rhn.redhat.com/errata/RHBA-2015-2375.html |