Linux SSD Configuration

The following settings should be used on Linux devices with a SSD. The instructions are Debian specific and taken from the SSDOptimization page on the Debian wiki.

Automatic Trim/Mount Options

Make sure the file system(s) are mounted with these options: discard,noatime,defaults As an example:

UUID=206e975c-6780-4175-a29e-3ed7a3d12e3b /               ext4    discard,noatime,defaults,errors=remount-ro 0       1


Set the scheduler for the SSD devices to deadline.

On Debian, first install the sysfsutils package:

apt-get install sysfsutils

Set the scheduler on boot:

echo "block/sda/queue/scheduler = deadline" >> /etc/sysfs.conf

Set the scheduler without rebooting:

echo deadline > /sys/block/sda/queue/scheduler

You can verify that it is working for each device with: for f in /sys/block/sd?/queue/scheduler; do printf "$f is "; cat $f; done


Mount /tmp on a ramdisk to prevent writes to the SSD. To do this:

cp /usr/share/systemd/tmp.mount /etc/systemd/system/
systemctl enable tmp.mount
service tmp.mount start

Manual trim

You can do a manual trim of all SSD disks with fstrim: fstrim -v -a

Leave a Reply

Your email address will not be published. Required fields are marked *