Following the outbreak of KPTI news, I recently updated my kernel to 4.14.11-300. In addition to a quite sufficient RAM (8 GB) and fast IO (SSD disk), I have started to feel remarkable slowdown in my system performance when I am mulitasking for example editing code and perform some other not-so-resource-intensive jobs, especially when I run out of physical RAM and switch to swap, which is hosted on SSD disk. I read in article, that you can disable the new imposed performance hit using the nopti
option. I did not find any command on my Fedora 26 as nopti
. Where should I use this feature and how?
1 Answer
Fedora has KPTI since 4.14.11 - https://fedoramagazine.org/protect-fedora-system-meltdown/
New kernel packages contain fixes for Fedora 26 and 27 (kernel version 4.14.11),
The nopti is kernel cmdline boot option - https://access.redhat.com/articles/3311301
Persistently disable - Effective across a reboot kernel command line by adding these flags, then reboot the kernel to have them take effect:
Edit it in your bootloader (GRUB) settings: https://fedoraproject.org/wiki/GRUB_2 (with files in /etc/default/grub and /etc/grub.d/)
GRUB_CMDLINE_LINUX=' .... nopti'
Then apply changes by regenerating of real grub config file
for BIOS systems:
grub2-mkconfig -o /boot/grub2/grub.cfg
for UEFI-based systems:
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
Then do reboot and check cat /proc/cmdline|grep pti
and cat /sys/kernel/debug/x86/pti_enabled
.
RHEL https://access.redhat.com/articles/3311301 also lists command echo 0 > /sys/kernel/debug/x86/pti_enabled
to turn off PTI, this may work only for processes started after changing the setting.
-
Added
nopti
to GRUB_CMDLINE_LINUX in/det/default/grub
, but when I check at boot time, it is not applied! Commented Jan 7, 2018 at 5:30 -
Do refresh of your real GRUB config from /etc files with
grub2-mkconfig -o /boot/grub2/grub.cfg
for BIOS and `grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg for UEFI-based grub as said in fedoraproject.org/wiki/GRUB_2– osgxCommented Jan 7, 2018 at 9:17
/proc/meminfo
and you should see improved performance. Note that the "MemAvailable" includes all caches and buffers so if you're running low, the system has to deal with lower cache and buffer sizes and the performance will suffer.