LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-10-2018, 05:57 AM   #1
anant.konchada
LQ Newbie
 
Registered: May 2010
Posts: 10

Rep: Reputation: 0
How to minimizing performance impact from Spectre and Meltdown fix


Hi Gentlemen,

I have installed Linux (RHEL variant) with Spectre and Meltdown fix and see ~15% performance drop when I enabled pti_enabled, ibpb_enabled and ibrs_enabled.
Then experimented one by one and found that PTI and IBPB has no impact but all 15% drop is coming from IBRS. This I see clearly when enable/disable IBRS.
I am doing it runtime “# echo 1 > /sys/kernel/debug/x86/ibrs_enabled”. Why only IBRS is dropping the performance but not other 2? i.e PTI and IBPB.

Also I saw in web some suggestion on how to reduce performance drop. We can reduce performance drop when we set “spectre_v2=retpoline,ibrs_user”and set
IBRS to 3, i.e "#echo 3 > /sys/kernel/debug/x86/ibrs_enabled".

I was able to set spectre_v2=retpoline,ibrs_user and rebooted the OS and I could see this reflected in /proc/cmdline. But RHEL is not allowing to set IBRS to 3 with
echo after rebooting. Can anyone suggest what could be the issue. I am using Kernal 3.10.0-693.17.1.el7.x86_64 with RHEL 7.4.

Want to enable Spectre and Meltdown correction. Any suggestions to drop any one of these settings (PTI, IBPB and IBRS) to minimize performance drop or any other
Recommendations/suggestions to minimize performance drop from 15%.

Regards
 
Old 04-10-2018, 07:00 AM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,649
Blog Entries: 4

Rep: Reputation: 3935Reputation: 3935Reputation: 3935Reputation: 3935Reputation: 3935Reputation: 3935Reputation: 3935Reputation: 3935Reputation: 3935Reputation: 3935Reputation: 3935
You can't have it both ways. To prevent pipeline exploitation you have to turn-off the pipelining and suffer the performance hit.

And, personally, I'm not sure that it's really worth it.
 
Old 04-10-2018, 07:23 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,623

Rep: Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964
Quote:
Originally Posted by anant.konchada View Post
Hi Gentlemen,
I have installed Linux (RHEL variant) with Spectre and Meltdown fix and see ~15% performance drop when I enabled pti_enabled, ibpb_enabled and ibrs_enabled.
Then experimented one by one and found that PTI and IBPB has no impact but all 15% drop is coming from IBRS. This I see clearly when enable/disable IBRS.
I am doing it runtime “# echo 1 > /sys/kernel/debug/x86/ibrs_enabled”. Why only IBRS is dropping the performance but not other 2? i.e PTI and IBPB.

Also I saw in web some suggestion on how to reduce performance drop. We can reduce performance drop when we set “spectre_v2=retpoline,ibrs_user”and set
IBRS to 3, i.e "#echo 3 > /sys/kernel/debug/x86/ibrs_enabled".

I was able to set spectre_v2=retpoline,ibrs_user and rebooted the OS and I could see this reflected in /proc/cmdline. But RHEL is not allowing to set IBRS to 3 with
echo after rebooting. Can anyone suggest what could be the issue. I am using Kernal 3.10.0-693.17.1.el7.x86_64 with RHEL 7.4.

Want to enable Spectre and Meltdown correction. Any suggestions to drop any one of these settings (PTI, IBPB and IBRS) to minimize performance drop or any other
Recommendations/suggestions to minimize performance drop from 15%.
Since you're using RHEL, have you contacted Red Hat support??? Because not only do they have an application available to detect if your hardware has this flaw, but also patches for the kernel to mitigate it while limiting performance problems.

Give them a call, and they can direct you to those resources.
 
Old 04-12-2018, 11:04 PM   #4
anant.konchada
LQ Newbie
 
Registered: May 2010
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by sundialsvcs View Post
You can't have it both ways. To prevent pipeline exploitation you have to turn-off the pipelining and suffer the performance hit.

And, personally, I'm not sure that it's really worth it.

Thanks sundialsvcs.
Yes i do feel the same. I am trying to see what is the level of impact on system behavior and is it worth enabling this at the cost of heavy performance.

Regards
 
Old 04-12-2018, 11:07 PM   #5
anant.konchada
LQ Newbie
 
Registered: May 2010
Posts: 10

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by TB0ne View Post
Since you're using RHEL, have you contacted Red Hat support??? Because not only do they have an application available to detect if your hardware has this flaw, but also patches for the kernel to mitigate it while limiting performance problems.

Give them a call, and they can direct you to those resources.
Yes i am in touch with RHEL and looking forward for some suggestions on benefits vs losses with with IBRS. I personally not very convinced to enable IBRS.

Regards
 
Old 04-21-2018, 11:20 PM   #6
anant.konchada
LQ Newbie
 
Registered: May 2010
Posts: 10

Original Poster
Rep: Reputation: 0
Thumbs up

Finally i found it is possible to set IBRS to 3 with Kernal version 3.10.0-693.21.1.el7.x86_64. Sofar I am using Kernal version 3.10.0-693.17.1.el7.x86_64.
I will do more tests and investigation with new Kernal and post the result for the benefit of full Linux community.
 
Old 04-22-2018, 07:47 AM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,623

Rep: Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964
Quote:
Originally Posted by anant.konchada View Post
Finally i found it is possible to set IBRS to 3 with Kernal version 3.10.0-693.21.1.el7.x86_64. Sofar I am using Kernal version 3.10.0-693.17.1.el7.x86_64. I will do more tests and investigation with new Kernal and post the result for the benefit of full Linux community.
And unless people pay for RHEL and apply the resources given, the steps aren't going to be of much benefit. Also, it is spelled "kernel".
 
  


Reply

Tags
meltdown, spectre



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Intel didn't tell CERTS, govs, about Meltdown and Spectre because they couldn't help fix it LXer Syndicated Linux News 0 02-27-2018 05:21 AM
LXer: Kali Linux Ethical Hacking OS Getting Fix for Meltdown and Spectre with Linux 4.15 LXer Syndicated Linux News 0 02-18-2018 02:30 AM
LXer: CloudLinux's KernelCare Promises to Fix Meltdown and Spectre Flaws without Reboots LXer Syndicated Linux News 0 02-09-2018 01:12 AM
LXer: Linux performance before and after Meltdown and Spectre fixes LXer Syndicated Linux News 0 02-02-2018 07:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:47 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration