Ubuntu on SSD
tweak & configuration for best performance
Start with 1st, 2nd reference (1, 2)
Modify the /etc/fstab & I/O scheduler
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
tmpfs /tmp tmpfs nodev,nosuid,noatime,mode=1777 0 0
# / was on /dev/sda1 during installation
UUID=338c2a9f-8a5f-4e4e-90c5-30d02a7680c5 / ext4 defaults,noatime,discard,errors=remount-ro 0 1
# /home was on /dev/sdb5 during installation
UUID=68f602b9-5384-4be2-8b7a-cbc1001504d2 /home ext4 defaults 0 2
# swap was on /dev/sda5 during installation
# ram 8G no need swap
# UUID=2b531fb1-b9fc-4653-859a-58af74951a2c none swap sw 0 0
proc /proc proc nodev,noexec,nosuid 0 0
tmpfs /tmp tmpfs nodev,nosuid,noatime,mode=1777 0 0
# / was on /dev/sda1 during installation
UUID=338c2a9f-8a5f-4e4e-90c5-30d02a7680c5 / ext4 defaults,noatime,discard,errors=remount-ro 0 1
# /home was on /dev/sdb5 during installation
UUID=68f602b9-5384-4be2-8b7a-cbc1001504d2 /home ext4 defaults 0 2
# swap was on /dev/sda5 during installation
# ram 8G no need swap
# UUID=2b531fb1-b9fc-4653-859a-58af74951a2c none swap sw 0 0
Automatic TRIM (3)
is supported since kernel 2.6.33 with the EXT4 file system
For automatic TRIM to work, the drive needs to be mounted with the "discard" option in fstab.
For automatic TRIM to work, the drive needs to be mounted with the "discard" option in fstab.
...
# / was on /dev/sda1 during installation
UUID=338c2a9f-8a5f-4e4e-90c5-30d02a7680c5 / ext4 defaults,noatime,discard,errors=remount-ro 0 1
UUID=338c2a9f-8a5f-4e4e-90c5-30d02a7680c5 / ext4 defaults,noatime,discard,errors=remount-ro 0 1
...
Modify /etc/rc.local (1, 2)
...
echo deadline > /sys/block/sda/queue/scheduler
echo 1 > /sys/block/sda/queue/iosched/fifo_batch
...
exit 0
Modify applications (4)
Firefox puts its cache in your home partition. By moving this cache in RAM you can speed up Firefox and reduce disk writes. Complete the previous tweak to mount /tmp in RAM, and you can put the cache there as well.
Open about:config in Firefox. Right click in an open area and create a new string value called browser.cache.disk.parent_directory. Set the value to /tmp.
Open about:config in Firefox. Right click in an open area and create a new string value called browser.cache.disk.parent_directory. Set the value to /tmp.
reference:
- http://askubuntu.com/a/86474
- http://itezer.com/blog/ubuntu-linux/125-four-tweaks-for-using-ubuntu-with-ssd.html
- TRIM http://askubuntu.com/questions/18903/how-to-enable-trim
- http://tombuntu.com/index.php/2008/09/04/four-tweaks-for-using-linux-with-solid-state-drives/