Link to home
Start Free TrialLog in
Avatar of letharion
letharionFlag for Sweden

asked on

Howto using sreadahead to cut down linux start time

Here: http://lwn.net/Articles/299483/ a laptop is booted in 5 seconds.
Part of that is achieved using "sreadahead": http://code.google.com/p/sreadahead/

I'd like to try the kernel patch, and see if I can improve start time. How?
I've downloaded the archive, made a copy of my current kernel, extracted the patch into that directory, but then I hit the first problem:

I'm not sure exactly how to apply the patch.
I have experimented with a few different ways, but when I'm done, make doesn't work, so I'm probably doing something wrong.
ASKER CERTIFIED SOLUTION
Avatar of Maciej S
Maciej S
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of letharion

ASKER

Aha, maybe that's why make didn't find a target?
So I just copy the 3 code files and the patch file to the source dir and then patch with -p1?
Must've messed up my no-ip, cause I can't seem to use it. Gonna try it when I get home in about 2 hours. :)
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Oh, hmm. Ofc. The patch is for the kernel, and the rest of the files are a separate program.
That's makes sense now that I think about it. Like I said I'm gonna try it out later.
Ok, I could patch the kernel fine, and compile the programs. I made a list for sread on what files to preload, and I think I got that part working, because my latest bootchart show a great deal better disk usage, but also a lot more disc usage, so made I'm loading to much data...

Anyway, I didn't gain a single second (from 27 secs) on my boot time, which feels wierd. Logging in to KDE feels somewhat faster, but I haven't measured the time yet.

I'm attaching a bootchart. It's a bit old, but still more or less accurate. I'm wondering if at least part of my problem is that I don't start a lot of "large" programs, but instead dhcpcd is taking a significant amount of time, which sread can't do much about.
bootchart.png
Here's the latest bootchart :)
bootchart.png
Thanks a lot for your help :)
It's unfortunate that I didn't gain any speedup, but that may be a bug in sreadahead. I've also noticed that work has continued on the deamon, and a 1.00 has been released for a 6.29 kernel.

I'm gonna try it out later :)
I rather use hibernate on my laptop, but it's a little buggy (or my configuration is ;)) and not always it hibernates or restores properly (more often it doesn't want to restore than hibernate). So - sometimes I have to go through whole booting process, and it's looooong :) Maybe I'll try that sreadahead also, but... too bad that it is still 0.04 version in portage, and it's still masked :/
0.04 unfortunately doesn't work with 2.6.28
see: http://code.google.com/p/sreadahead/issues/list
but perhaps an 0.05 comes out and we can try it :)
Well, I'm still using 2.6.24 with tuxonice patches. But, as there is already 2.6.28 tuxonice available, maybe I'll upgrade :)
Anyway - thanks for info. I didn't even know sreadahead before your question ;)