readahead slows down boot

Petter Reinholdtsen pere at hungry.com
Sat Apr 5 07:33:51 UTC 2008


[Alexander Heinlein]
> Petter Reinholdtsen wrote:
>>Perhaps it failed to stop when it should, and load all the files used when
>>you log in addition to the files that is used during boot?  To test this
>>theory, you could run one profile run, reboot, and then try to boot
>>normally, without logging in after the profile run.

I found a machine to test on, and sure enough, the readahead-watch
process was still running after boot.  So stop-readahead has failed to
kill it.  I suspect the reason is because the pid file is missing or
contain the wrong pid.  If this is the case, I would recommend
changing the pid file location used by readahead-watch
/var/run/readahead-watch.pid to /lib/init/rw/readahead-watch.pid.

Does it help to do 'echo RAMRUN=yes >> /etc/default/rcS'?  It did when
I tested it.

> Profiling without logging in leads to the same results. Here is my
> /etc/boot generated by readahead:
> http://choerbaert.org/scy/pics/bootchart/readahead_etc_boot.txt

Hm, about 1500 files to load during boot do not seem to wrong.  Got
around 1200 on my laptop.  Looking through the files, I did not see
anything obviously wrong.  Are you starting spamassassin during boot?

> Even after removing gdm from the runlevel readahead still reads too much
> from the hard disk:
> http://choerbaert.org/scy/pics/bootchart/2.6.24.4_nox_normal.png
> http://choerbaert.org/scy/pics/bootchart/2.6.24.4_nox_readahead.png
> http://choerbaert.org/scy/pics/bootchart/readahead_etc_boot_nox.txt
> (/etc/boot contains just some xfs stuff)

Thank you.

> Maybe readahead has some problems with a particular init script.

The only one I know about is preload, which will load all the files
used by the user after login at the end of the boot to speed up login
times.

Happy hacking,
-- 
Petter Reinholdtsen




More information about the initscripts-ng-devel mailing list