Thursday October 22nd, 2009By: CyrIng

Howto tweak Linux with SSD


  • Optimize writing’s scheduling as a fifo

# nano /boot/grub/menu.lst

default   0
# (0) Arch Linux

title  Arch Linux      [SSD]
root   (hd0,0)
kernel /boot/vmlinuz26 root=/dev/sdb1 ro elevator=noop quiet vga=0xf01
initrd /boot/kernel26.img
  • Avoid files & directories access time updates

# nano /etc/fstab

/dev/sdb1 / ext2   defaults,noatime,nodiratime 0 0
  • Mount temps & logs directories onto a RAM filesystem

# nano /etc/fstab

tmpfs /tmp         tmpfs  nosuid,rw,noatime,nodiratime,size=1024M 0 0
tmpfs /var/tmp     tmpfs  noexec,nosuid,rw,noatime,nodiratime,size=256M 0 0
tmpfs /var/run     tmpfs  noexec,nosuid,rw,noatime,nodiratime,size=1024M 0 0
tmpfs /var/lock    tmpfs  noexec,nosuid,rw,noatime,nodiratime,size=64M 0 0
tmpfs /var/lib/gdm tmpfs  noexec,nosuid,rw,noatime,nodiratime,gid=133,size=64M 0 1
tmpfs /var/log     tmpfs  noexec,nosuid,rw,noatime,nodiratime,size=64M 0 0
tmpfs /var/abs/local tmpfs nosuid,rw,noatime,nodiratime,size=1024M 0 0
  • Make missing directories at startup

# nano /etc/rc.local

mkdir /var/log/gdm
  • Preserve a cache and logs filesystem per user *

# nano /etc/fstab

tmpfs /home/username/.cache tmpfs rw,noatime,nodiratime,uid=1000,gid=100,size=1024M 0 0

* specify your user’s name, id and group numbers found into /etc/passwd

  • Symlink Firefox’s cache and plugins directories

$ nano ~/.profile

mkdir ~/.cache/.mozilla
mkdir ~/.cache/.adobe
mkdir ~/.cache/.macromedia
ln -s ~/.cache/.adobe ~/.adobe
ln -s ~/.cache/.macromedia ~/.macromedia
  1. Start Firefox and open its configuration registry with about:config
  2. Create or update the key browser.cache.disk.parent_directory with the value ~/.cache/.mozilla
  3. Close or restart Firefox
  • Symlink HandBrake Encoder

$ nano ~/.profile

mkdir -p ~/.cache/ghb/EncodeLogs
ln -s ~/.cache/ghb/Activity.log ~/.config/ghb/Activity.log
ln -s ~/.cache/ghb/EncodeLogs ~/.config/ghb/EncodeLogs
  • Symlink OpenOffice

$ nano ~/.profile

mkdir ~/.cache/
touch ~/.cache/
ln -s ~/.cache/ ~/
  • Disable the Thunderbird cache

  1. Start the Config Editor into the Mail/News Preferences
  2. Modify browser.cache.disk.enable key with boolean value false

and so on …