Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save alexzhang2015/156877d15c3c5c839b63a739a7caa739 to your computer and use it in GitHub Desktop.
Save alexzhang2015/156877d15c3c5c839b63a739a7caa739 to your computer and use it in GitHub Desktop.
Optimize performance for SSD (NVMe) on Linux
sudo cp /etc/fstab /etc/fstab.bak
# Eschewing Access Times
sudo nano /etc/fstab
# add this options, make sure they’re all separated by commas and no spaces.
noatime,nodiratime
# example: UUID=uuid_number / ext4 defaults,noatime,discard,errors=remount-ro 0 1A
# TRIM Fit
discard
# Add to kernel boot parameters
sudo nano /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset scsi_mod.use_blk_mq=1"
sudo update-grub2
# Benchmark
sudo hdparm -tT --direct /dev/nvme0n1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment