3

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?

migrated from stackoverflow.com Jan 8 '18 at 16:18

This question came from our site for professional and enthusiast programmers.

  • 2
    I don't think you should see "remarkable slowdown" when you are doing tasks like editing code. I'd investigate to make sure something else isn't causing issues and the KPTI patch just a coincidence. – mattdm Jan 8 '18 at 22:51
  • I would bet that your "remarkable slowdown" is caused solely by running out of RAM. Try to kill some processes to increase the amount of "MemAvailable" RAM in /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. – Mikko Rantalainen Oct 1 '18 at 7:07
3

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! – codezombie Jan 7 '18 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 – osgx Jan 7 '18 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.