How to optimize a solid state drive
Important background
The SSD Anthology: http://www.anandtech.com/show/2738
Wiping the drive
https://ata.wiki.kernel.org/index.php/ATA_Secure_Erase
http://www.anandtech.com/show/2738/11
You should do a complete drive erase whenever you rebuild the OS.
Rebuilding the partitions
Don't put a swap partition on the SSD. You also want to worry about "alignment" of partitions. I avoided this issue by filling the entire drive with a single partition.
Kernel support
To get TRIM support in Linux, you need the 2.6.33 kernel or better. To get this working in Lucid (2.6.32):
sudo add-apt-repository ppa:kernel-ppa/ppa sudo apt-get update sudo apt-get install linux-headers-2.6.36-1 linux-headers-2.6.36-1-generic sudo apt-get install linux-image-2.6.36-1-generic
TRIM support
TRIM is executed weekly by /etc/cron.weekly/fstrim
You can also test manually with
root@gpu:~# fstrim -v / /: 194551808 bytes were trimmed
OLD: Updates to /etc/fstab
- Activate TRIM by adding a "discard" option to the SSD file system mount line. Also add "noatime" for efficiency:
UUID=7b019be8-1708-40a1-b811-4fd138246dab / ext4 errors=remount-ro,noatime,nodiratime,discard 0 1
- Mount /tmp directly in RAM:
tmpfs /tmp tmpfs noexec,defaults,noatime 0 0