Mount options
First thing I tried was adding nodiratime and noatime options to the mount options of / and /home partitions. To do that, just edit /etc/fstab and add these options alongside the existing ones. My fstab looks something like this now:
/dev/sda1 / ext4 nodiratime,noatime,errors=remount-ro 0 1 UUID=..... /home ext4 defaults,nodiratime,noatime 0 2
I didn't notice any major speedup after these changes, but they do seem common sense and lack of speedup might be due to my particular setup (some VMs I'm using).
Install ureadahead
Next I installed the ureadahead package which is supposed to lower boot up times. Install was easy:
sudo apt-get install ureadaheadAccording to what I read, on first run, ureadahead logs bootup files accesses and then aggregates these files into cached file that will be used in next bootups to speed things up. It also optimizes this cached file according to the type of disk that you have (SSD or HDD). After the system boots, ureadahead process seems to terminate and just gets out of the way.
I didn't notice any major speedup on this either. It could be some, but bootup time is still several times more of the Ubuntu advertised "10 seconds bootup".
Install preload
Preload is a daemon that logs statistics about programs usage and requirements and use these statistics to speed up programs startup. I guess this is what Windows has on by default in that prefetched folder. As mentioned in the man pages, the speed up is not immediately, because preload first needs to collect the stats and create some caches before it can use them. Even so, I did see programs starting faster pretty soon after installing preload. I just installed using:
sudo apt-get install preload
Install prelink
Preling is a tool that improves memory usage and load times by optimizing programs and libraries. Install it using:
sudo apt-get install prelinkAfter install, you need to start the optimization process. Before I did that, first I edited /etc/prelink.conf to include /opt directory in the optimization process because I have some custome software there. After that, just run
sudo prelink -avmRThe option v is for verbose so that you can see what's processing. You could remove that if you don't care. I guess I'll need to run such a command when I update/install new software, but that's not a big issue.
Although I installed it mostly for the "memory optimizations" promise, Prelink also seemed to help with speed. I'm not sure how much since I installed it after preload which already helped in that area.
Update: prelinking broke Skype resulting in segmentation fault upon restart. Reinstalling skype fixed the problem. I hope not much else is broken, especially because Skype is not your average ubuntu/linux app.
ReplyDelete