Disable Meltdown/Spectre to regain performance

Kernels & Hardware, configuring network, installing services

Disable Meltdown/Spectre to regain performance

Postby bester69 » 2018-06-27 23:14

Hi,

Because of the current Intel CPU security hole issue, there is a patch expected which slows down the system performance.
Reading some articles, they say that in order to recover the lost performance before the security paches, You need to disable the PTI(Page Table Isolation).
https://www.stevenrombauts.be/2018/02/h ... chmarking/

So would be theses considerations ok?.:
- For Spectre patches lost performance >> uninstall firmware-intel or install version before Spectre pacthes
- For Meltdown patches lost performance >> Disable PTI (nopti pti=off)

Ive got into this solution, Add the following to the end of your kernel argument in grub:
spectre_v2=off nopti pti=off

is it right?? , any additional consideration? :roll:

Thanks.
bester69 wrote:There is nothing to install in linux, from time to time i go to google searching for something fresh to install in linux, but, there is nothing
User avatar
bester69
 
Posts: 1201
Joined: 2015-04-02 13:15

Re: Disable Meltdown/Spectre to regain performance

Postby sunrat » 2018-06-28 01:36

Now you're being silly. Why compromise security for an imperceptible performance boost? Have you tested how much difference it makes?
The Meltdown/Spectre patches were added months ago. Personally I noticed no difference.
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!
User avatar
sunrat
 
Posts: 2432
Joined: 2006-08-29 09:12
Location: Melbourne, Australia

Re: Disable Meltdown/Spectre to regain performance

Postby debiman » 2018-06-28 10:34

the intel firmware has nothing to do with linux kernel's PTI.
(i think intel "promised" to "fix" the issue via firmware, but it seems linux kernel devs don't trust that so much)

i noticed a significant performance drop after PTI was first introduced into the kernel, but idk - either i got used to it, or it got better in subsequent kernel verisons.
i am now on 4.14.51.
User avatar
debiman
 
Posts: 2818
Joined: 2013-03-12 07:18

Re: Disable Meltdown/Spectre to regain performance

Postby stevepusser » 2018-06-28 16:34

Just wait--BSD has disabled hyperthreading in their kernels in response to a yet undisclosed Intel vulnerability scheduled to be announced at the Black Hat conference in August. That drops performance by at least 20% on affected Intel CPUs...including mine. :cry:
Intel is rumored to be trying to come with a fix that won't affect performance as much, but the bad news just keeps coming.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: GIMP 2.10.6, Pale Moon 28.1.0, wine-staging 3.16, qBittorrent 4.1.3, Linux kernel 4.18.8, virtualbox 5.2.18
User avatar
stevepusser
 
Posts: 9920
Joined: 2009-10-06 05:53

Re: Disable Meltdown/Spectre to regain performance

Postby Head_on_a_Stick » 2018-06-28 16:53

stevepusser wrote:Just wait--BSD has disabled hyperthreading in their kernels in response to a yet undisclosed Intel vulnerability

The OpenBSD devs believe that Intel's technique leaves the door open for an entire class of new vulnerabilities, not just one:

https://marc.info/?l=openbsd-cvs&m=152943660103446&w=2

stevepusser wrote:That drops performance by at least 20% on affected Intel CPUs

I've been running without SMT in OpenBSD since the original commit and I can notice very little difference :)

Theo even suggests that the box may run faster without hyperthreading:

https://marc.info/?l=openbsd-misc&m=152938776411086&w=2
User avatar
Head_on_a_Stick
 
Posts: 7908
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Disable Meltdown/Spectre to regain performance

Postby bester69 » 2018-06-28 16:57

debiman wrote:the intel firmware has nothing to do with linux kernel's PTI.
(i think intel "promised" to "fix" the issue via firmware, but it seems linux kernel devs don't trust that so much)

i noticed a significant performance drop after PTI was first introduced into the kernel, but idk - either i got used to it, or it got better in subsequent kernel verisons.
i am now on 4.14.51.

My system is very old spec's, and Im still using 4.4.39 cos performance and graphical feelings, I dont need this kind of security patches in my computer, none is gonna knock at my door..
but other day I was thinking perhaps if i disabled PTI I might be able to move on to new kernels and keep similar or improve performance.. I did it with PTI and tried with last 4.4.x and with 4.17.x and It wasnt the case, I think from some old version on, they introduced something in kernel that makes my old computer feel badly different, I feel it like if graphics were using something like VAAPI with a litle smooth graphical response, Its an annoy and artificial feeling I cant feed up with. I cant explain it, but every kernel i try i come back to 4.4.39.
bester69 wrote:There is nothing to install in linux, from time to time i go to google searching for something fresh to install in linux, but, there is nothing
User avatar
bester69
 
Posts: 1201
Joined: 2015-04-02 13:15

Re: Disable Meltdown/Spectre to regain performance

Postby Head_on_a_Stick » 2018-06-28 17:03

bester69 wrote:I cant explain it

It is a basic feature of human psychology called confirmation bias:

https://en.wikipedia.org/wiki/Confirmation_bias

This is why we have benchmarks :)
User avatar
Head_on_a_Stick
 
Posts: 7908
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Disable Meltdown/Spectre to regain performance

Postby GarryRicketson » 2018-06-28 18:41

Great Link, I like this part:
Explanations for the observed biases include wishful thinking and the limited human capacity to process information. Another explanation is that people show confirmation bias because they are weighing up the costs of being wrong, rather than investigating in a neutral, scientific way. However, even scientists can be prone to confirmation bias.[2]
Confirmation biases contribute to overconfidence in personal beliefs and can maintain or strengthen beliefs in the face of contrary evidence. Poor decisions due to these biases have been found in political and organizational contexts.[3][4]
User avatar
GarryRicketson
 
Posts: 5056
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: Disable Meltdown/Spectre to regain performance

Postby stevepusser » 2018-06-28 20:51

Head_on_a_Stick wrote:
stevepusser wrote:Just wait--BSD has disabled hyperthreading in their kernels in response to a yet undisclosed Intel vulnerability

The OpenBSD devs believe that Intel's technique leaves the door open for an entire class of new vulnerabilities, not just one:

https://marc.info/?l=openbsd-cvs&m=152943660103446&w=2

stevepusser wrote:That drops performance by at least 20% on affected Intel CPUs

I've been running without SMT in OpenBSD since the original commit and I can notice very little difference :)

Theo even suggests that the box may run faster without hyperthreading:

https://marc.info/?l=openbsd-misc&m=152938776411086&w=2


Well, I can't turn it off on my machine, but I know it can on some computers. Is there a kernel boot flag to do this? Let's see some benchmarks! Though I'm sure Phoronix will have some, too.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: GIMP 2.10.6, Pale Moon 28.1.0, wine-staging 3.16, qBittorrent 4.1.3, Linux kernel 4.18.8, virtualbox 5.2.18
User avatar
stevepusser
 
Posts: 9920
Joined: 2009-10-06 05:53

Re: Disable Meltdown/Spectre to regain performance

Postby bester69 » 2018-06-28 22:15

Head_on_a_Stick wrote:
bester69 wrote:I cant explain it

It is a basic feature of human psychology called confirmation bias:

https://en.wikipedia.org/wiki/Confirmation_bias

This is why we have benchmarks :)

Very intersting and complex subject, Dont think i didnt thought of that, I started to think perhaps my mind was tricking me , So I tried some kernels for a three , four days period, and there was something I didnt feel confortable.. I can swear you I dont need benchmarks to feel if it performance worse, similar or better, we're talking about and old low spec laptop where minimal differences can be felt it easily.

To me, happend the same with some interestings beliefs, I do know they're "truth" cos the model that explains them
fits an empirical reality according to my experiences life. Im talking about two different and important litle known concepts: "reactive mind" and "organic portals"..I share that "bias confimation" with anyone of you that might be interested.
bester69 wrote:There is nothing to install in linux, from time to time i go to google searching for something fresh to install in linux, but, there is nothing
User avatar
bester69
 
Posts: 1201
Joined: 2015-04-02 13:15

Re: Disable Meltdown/Spectre to regain performance

Postby Head_on_a_Stick » 2018-06-29 04:59

stevepusser wrote:Is there a kernel boot flag to do this?

Have you tried
Code: Select all
noht

Let's see some benchmarks!

The framerate in games/openarena is unchanged, as are the render times in graphics/blender.
User avatar
Head_on_a_Stick
 
Posts: 7908
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Disable Meltdown/Spectre to regain performance

Postby stevepusser » 2018-06-29 17:20

The noht flag doesn't have any effect, at least on backported Debian experimental 4.17.2 and Liquorix 4.16-16.3 kernels...
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: GIMP 2.10.6, Pale Moon 28.1.0, wine-staging 3.16, qBittorrent 4.1.3, Linux kernel 4.18.8, virtualbox 5.2.18
User avatar
stevepusser
 
Posts: 9920
Joined: 2009-10-06 05:53

Re: Disable Meltdown/Spectre to regain performance

Postby Head_on_a_Stick » 2018-06-29 19:23

stevepusser wrote:The noht flag doesn't have any effect

Yes, my apologies, I should have tested that before posting :oops:

I can only find nosmt but it doesn't apply to x86_64 (amd64), unfortunately:

https://github.com/torvalds/linux/blob/ ... .txt#L2687
User avatar
Head_on_a_Stick
 
Posts: 7908
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Disable Meltdown/Spectre to regain performance

Postby Head_on_a_Stick » 2018-07-01 10:06

stevepusser wrote:Is there a kernel boot flag to do this?

This works on my ThinkPad X201 with the stock Debian stable kernel:
Code: Select all
nosmp

Performance seems restricted though :?
User avatar
Head_on_a_Stick
 
Posts: 7908
Joined: 2014-06-01 17:46
Location: /dev/chair


Return to System configuration

Who is online

Users browsing this forum: No registered users and 3 guests

fashionable