Last active
October 10, 2024 21:39
-
-
Save trungnt13/d6632130c43db424d56f0d30247033ec to your computer and use it in GitHub Desktop.
Optimize performance for SSD (NVMe) on Linux
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
you can add barrier=0 to fstab parameters, with docker applications increase substantially the io and reduce latency