1

My boot and login are a lot slower than a fresh install.

How do I trace the boot and login processes to figure out what programs are taking a long time to load?

1 Answer 1

5

One way is to use the bootchart package - this produces a .png image file showing what processes are being started and how long these processes run for. It also describes disk-throughput which shows how efficient information is fetched from your disk.

To install -

sudo apt-get install bootchart pybootchartgui

Reboot and login.

Look in /var/log/bootchart for the image file.

for example - part of my bootchart looks like:

enter image description here

To uninstall -

sudo apt-get remove bootchart pybootchartgui

Possible causes of a slow boot

First check if you are running any unnecessary processes - for example bluetooth, modemmanager. Also check what processes are running after login.

Its also worth re-caching your ureadahead cache files - these files are used to speed up your boot. Remember, remove bootchart first, reboot, remove the *.pack files and reboot twice again before reinstalling bootchart.

8
  • Is there any way to figure out which processes are doing the most I/O at any point in time, and to figure out the actual commmand-line of the processes? I'm seeing lots of random sh's but I have no idea what they're doing, or if they're doing a lot of I/O...
    – user541686
    Dec 23, 2011 at 21:29
  • Ahhh this one's a good log; see here.
    – user541686
    Dec 23, 2011 at 22:07
  • nothing major in that - you could remove some unnecessary stuff like bluetooth/lmsensors/modem-manager but that wont reduce the boot greatly. The majority of the trace is setting up the unity desktop. This is a known issue with 11.04 & 11.10. It has been improved greatly in 12.04
    – fossfreedom
    Dec 23, 2011 at 22:53
  • (1) I'm not using Unity though... I'm on Classic. (2) The boot is about twice as fast on a fresh install... :\
    – user541686
    Dec 23, 2011 at 23:05
  • still lots of stuff launching after login though. Try recaching your ureadahead files (askubuntu.com/questions/78623/ureadahead-how-to-clear-its-cache) - delete, reboot and reboot again for the cache to take effect. Does this improve your boot time.
    – fossfreedom
    Dec 23, 2011 at 23:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .