Page 1 of 1

Linux: How to disable mitigations for CPU vulnerabilities

Posted: Tue Jan 12, 2021 1:07 pm
by biodoc

Re: Linux: How to disable mitigations for CPU vulnerabilities

Posted: Tue Jan 12, 2021 5:11 pm
by StefanR5R
While I never profiled its effects, I have mitigations off on all of my DC-dedicated computers.
It was a small nuisance to figure out how to set the GRUB config accordingly in Mint.
In OpenSuse, there is a dialogue for this in their central system management GUI.

Re: Linux: How to disable mitigations for CPU vulnerabilities

Posted: Wed Jan 13, 2021 6:34 am
by biodoc
I ran your llrDIV script on my 2P Ivy with mitigations on and off and although the trend seemed to be a slight improvement, I doubt it's statistically significant.
Mitigations on:
Image

Mitigations off:
Image

Re: Linux: How to disable mitigations for CPU vulnerabilities

Posted: Wed Jan 13, 2021 6:43 am
by biodoc
StefanR5R wrote:
Tue Jan 12, 2021 5:11 pm
It was a small nuisance to figure out how to set the GRUB config accordingly in Mint.


For others using Mint:

sudo nano /etc/default/grub

Before editing:

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

After editing:

GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash mitigations=off"
GRUB_CMDLINE_LINUX=""

Save the change.
sudo update-grub
reboot

Re: Linux: How to disable mitigations for CPU vulnerabilities

Posted: Wed Jan 13, 2021 1:49 pm
by crashtech
I did not rtfm but I skimmed it, and didn't find how to put more than one command in that line. Some of my PCs have this:

GRUB_CMDLINE_LINUX_DEFAULT="quiet vsyscall=emulate"

I'm not sure how to add that in, it looks like just put "mitigations=off" into the quotation marks...?

For instance:

GRUB_CMDLINE_LINUX_DEFAULT="quiet vsyscall=emulate mitigations=off"

Re: Linux: How to disable mitigations for CPU vulnerabilities

Posted: Wed Jan 13, 2021 2:20 pm
by StefanR5R
Correct. You can enter as many kernel parameters as you need, separated by space characters, and in any order.

Added in 4 minutes 32 seconds:
biodoc wrote:
Wed Jan 13, 2021 6:34 am
I ran your llrDIV script on my 2P Ivy with mitigations on and off and although the trend seemed to be a slight improvement, I doubt it's statistically significant.
Every percent counts. ;-)

Perhaps GPGPU workloads profit more, as they involve more calls into the kernel, and device I/O.

Re: Linux: How to disable mitigations for CPU vulnerabilities

Posted: Wed Jan 13, 2021 2:33 pm
by crashtech
Thanks for being patient with such elementary queries, Stefan. I don't think I can understate how valuable your advice has been over the years.

Re: Linux: How to disable mitigations for CPU vulnerabilities

Posted: Wed Jan 13, 2021 3:04 pm
by crashtech
StefanR5R wrote:
Wed Jan 13, 2021 2:25 pm
Every percent counts. ;-
In drag racing they call this "stacking tenths," referring to arriving just a tenth of a second faster at the finish. One small change may not seem to make a difference, but many small changes do.

Re: Linux: How to disable mitigations for CPU vulnerabilities

Posted: Wed Jan 13, 2021 3:22 pm
by biodoc
I shut down the 2P Ivy beast for now. The PPD is between a 3700X and a 3900X and it draws 310 watts from the wall with turbo boost off. I'll replace it when you can actually buy hardware sometime in the future.

Re: Linux: How to disable mitigations for CPU vulnerabilities

Posted: Thu Jan 14, 2021 5:56 pm
by Skillz
crashtech wrote:
Wed Jan 13, 2021 3:04 pm
StefanR5R wrote:
Wed Jan 13, 2021 2:25 pm
Every percent counts. ;-
In drag racing they call this "stacking tenths," referring to arriving just a tenth of a second faster at the finish. One small change may not seem to make a difference, but many small changes do.
When in doubt, just put it on the bottle. :lol:

Re: Linux: How to disable mitigations for CPU vulnerabilities

Posted: Thu Jan 14, 2021 5:59 pm
by crashtech
We need nitrous for PCs!

Re: Linux: How to disable mitigations for CPU vulnerabilities

Posted: Sat Jan 16, 2021 11:43 pm
by Skillz
Remember the turbo button from the 90s?