Damn. 15 secondish boot time (from power on). Lot of that is the BIOS checking for drives and starting grub! From selecting the OS in grub to the login screen is about 3-4 seconds, and from entering my password to having a usable desktop: about 2 more.
Here’s how (on Ubuntu Lucid):
I’m using a shared ramdisk for /tmp, /var/tmp, /var/log and /var/cache. My root file system’s fstab entry looks like this:
# <file system> <mount point> <type> <options> <dump> <pass> proc /proc proc nodev,noexec,nosuid 0 0 tmpfs /tmp tmpfs defaults,noatime,nodiratime,mode=1777 0 0 none /var/tmp aufs br:/tmp=rw:/var/tmp=ro 0 0 none /var/log aufs br:/tmp=rw:/var/log=ro 0 0 none /var/cache aufs br:/tmp=rw:/var/cache=ro 0 0# / was on /dev/sda1 during installation UUID=50143bce-e400-418b-a8d4-c8e596820fb3 / ext4 noatime,nodiratime,data=writeback,barrier=0,nobh,commit=25,errors=remount-ro 0 1
http://kerneltrap.org/node/14148 Linus doesn’t particularly care for ‘atime’ :)
Not sure how keen I am on putting that much in /tmp, I seem to use up memory fairly quickly when I install updates etc. I think I might let /var/cache go back onto SSD or possibly even hard drive.
In /etc/default/grub, changed the GRUB_CMDLINE_LINUX_DEFAULT for Grub2:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash elevator=deadline rootflags=data=writeback"
tune2fs -o journal_data_writeback /dev/sda1
And add this to /etc/rc.local before the “exit 0”
echo 1 > /sys/block/sda/queue/iosched/fifo_batch for dir in apparmor apt news cups dist-upgrade fsck gdm installer samba unattended-upgrades do if [ ! -e /var/log/$dir ] then mkdir /var/log/$dir fi done if [ -d '/sys/module/hid_apple' ] ; then echo 2 > /sys/module/hid_apple/parameters/fnmode elif [ -d '/sys/module/hid/parameters' ] ; then echo 2 > /sys/module/hid/parameters/pb_fnmode fi
and these lines to /etc/sysctl.conf to reduce the tendency to swap stuff out of RAM to the disk.
vm.dirty_ratio = 40 vm.dirty_background_radio = 1 vm.dirty_writeback_centisecs = 24000 vm.swappiness = 1
Now I just wish I had a bigger SSD so I could put Windows 7 and Linux on it :)
Have to wait a few months till I can justify splashing out on another SSD though :)