Showing posts with label karmic koala. Show all posts
Showing posts with label karmic koala. Show all posts

Sunday, 14 June 2009

Does pre-linking speed up boot times?

Pre-linking binaries is a method of modifying ELF libraries so that the relocation link time overhead is performed not at load time and hence theoretically speeding up program start time (see the Wikipedia entry for more details).


To test this, I installed Karmic 9.10 Alpha 2 on a Dell Inspiron 6400 laptop using ext4 as my default file system and added some instrumentation to measure the time from when the first rc scripts are started to the time the desktop completes loading when auto-logging in.


First, I measured the startup time 5 times without prelinking; this came to an average of 16.397 seconds with a standard deviation of 0.21 seconds.

Next I installed prelink and pre-linked all the system libraries (which takes ~5 minutes) using the following recipe:

  1. apt-get install prelinkuse apt-get or synaptic to install prelink.
  2. Open /etc/default/prelink with your favorite editor, using sudo
  3. Modify PRELINKING=unknown from unknown to yes
  4. Start the first prelink by running: sudo /etc/cron.daily/prelink
Then I repeated the boot time measurements with prelinking enabled; this came to an average of 16.343 seconds with a standard deviation of 0.09 seconds.

So I am seeing tiny ~0.33% speed up of 0.054 seconds which is within the margin of measuring error. All in all this took me ~1.5 hours to set up and measure, which means that if I boot my laptop once a day it will take me 274 years before I start saving time :-)

All in all it's not really worth enabling prelinking. At least I now know!

(Note: pre-linking may be considered a security issue, as Ubuntu makes use of randomizing the start of code to make it more difficult for rogue programs to exploit.)

I suspect that if the processor was significantly slower and there was less I/O delay (perhaps using SSD rather than HDD) I may actually see more of a significant speed up since prelinking saves some CPU cycles. I speculate that prelinking may be therefore worth considering on lower speed or less powerful platforms such as ARM or Intel Atom based machines.

The next test will be to see if large applications that use tens of libraries start up faster...

Friday, 12 June 2009

Karmic Koala Alpha 2 ready for testing.

Ubuntu 9.10 Karmic Koala Alpha two is now ready to download for testing. This is an Alpha release, so do NOT install it on production machines! The final stable version will be released on October 29th, 2009.

So what's new?
  • Linux 2.6.30-5.6 kernel based on 2.6.30-rc5, with Kernel Mode Setting enabled for Intel graphics. Note that LRM is now deprecated in favour of DKMS packages.
  • GNOME 2.27.1
  • GRUB 2 by default
  • GCC-4.4
Changes to video:

The new Intel video driver architecture is available for testing. In later Alphas there will be probably a switch from the current "EXA" acceleration method to the new "UXA". This will solve major performance problems of Ubuntu 9.04, but is still not as stable as EXA, which is why it is not yet enabled by default. To help testing UXA, please check out the instructions and testing webpage.

Feedback about the new Kernel Mode Setting (KMS) feature is also heavily appreciated. This will reduce video mode switching flicker at booting, and dramatically speed up suspend/resume. To help test this, check out the KMS instructions and feedback webpage.

For more details visit http://www.ubuntu.com/testing/karmic/alpha2