1.8 KiB
title | date | draft | type | tags | ||
---|---|---|---|---|---|---|
Weirder Linux Tricks | 2021-02-21 | true | post |
|
Originally posted on my old blog
Here's some more weirder Linux tricks, if the first post wasn't enough.
Faster than host guest
What? How can the VM be faster than the host? It's possible if the host is a systemd-nspawn
container. Just pass through KVM acceleration with --bind=/dev/kvm
, and you'll be shocked at how much faster the VM is compared to the systemd-nspawn
container. Yes, for raw CPU virtualization, KVM really is that fast.
Arch all the way down
Meta!
Make Linux fast again
Pass the mitigations=off
kernel parameter in your bootloader to disable all CPU exploit mitigations that protect you from the nasty Spectre and Meltdown vulnerabilities. This is pretty much the pretty much the computing equivalent of anti-vaxxing, since widespread patching against these vulnerabilities have prevented them from showing up in attacks in the wild. However, the performance gains are really not worth the risk, so use this very wisely!
DoS yourself!
Don't run :(){:|:&};:
. Don't do it. If you want to take the risk, first limit the number of processes you can run with ulimit
. You've been warned.
sudo rm -rf /dev/cpu/0/
OK, not really, but you can do echo 0 | sudo tee /sys/devices/system/cpu/cpu0/online
to disable CPU 0. Just don't try to take down all your processors at the same time.