Skip to content

Instantly share code, notes, and snippets.

@trungnt13
Last active October 10, 2024 21:39
Show Gist options
  • Save trungnt13/d6632130c43db424d56f0d30247033ec to your computer and use it in GitHub Desktop.
Save trungnt13/d6632130c43db424d56f0d30247033ec 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
@diododias
Copy link

you can add barrier=0 to fstab parameters, with docker applications increase substantially the io and reduce latency

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment