Monday, June 11, 2012

Optimizing Lubuntu 12.04 for solid-state drives

1. add noatime and discard to root drive
sudo nano /etc/fstab

UUID=265db2a0-0839-4299-8995-b8ead0acda42      /      ext4    discard,noatime,errors=remount-ro 0 1


2. add tmpfs ram filesystem folders for /tmp, /var/tmp, /var/log

tmpfs   /tmp             tmpfs   defaults   0 0
tmpfs   /var/tmp       tmpfs   defaults   0 0
tmpfs   /var/log        tmpfs   defaults   0 0

3. set chromium-browser to use cache folders in /tmp ramdrive
sudo nano /usr/share/applications/chromium-browser.desktop
#Exec=/usr/bin/chromium-browser %U
Exec=/usr/bin/chromium-browser --disk-cache-dir="/tmp/chromium-browser" %U

4.Edit /etc/default/grub using your favorite editor, and add "elevator=noop" to the list of GRUB_CMDLINE_LINUX_DEFAULT values. The corresponding line will then look like:
GRUB_CMDLINE_LINUX_DEFAULT="elevator=noop quiet splash"

Then rebuild GRUB2 configuration files:
$ sudo update-grub