Speeding boot with readaheadForum: DSL Ideas and Suggestions Topic: Speeding boot with readahead started by: curaga Posted by curaga on Sep. 27 2007,14:33
Here's the c code of the most recent version of readahead I found (1.01-2 - ubuntu1), from Ubuntu's Gutsy repository. It takes only 3kb when compiled with -Os and stripped, and needs only glibc and the kernel headers. I can't right now compile it on DSL, and the ones compiled on my Aero are most certainly not DSL compatible.. Readahead is commonly used to speed up the boot, by using it in the background during a cpu-headed process (like the hwconfig with the green bar, it doesn't read anything and takes some time that could be used) to load the files needed by the next part of the boot into cache. It works, I tested with Mplayer (reading that 8mb binary takes some seconds, but when I loaded it into cache with readahead, surprise it started instantly) and remembered to clean the cache between tests. Posted by curaga on Oct. 04 2007,17:38
< Here's a compiled version >I will see how this could be best used during DSL boot. Comments anyone? Posted by curaga on Oct. 05 2007,14:54
I'll tell the Ubuntu philosophy of using it:They have a list of files accessed during boot. They generated it with the boot watcher program, the one that also creates graphs of cpu usage per process etc. Then they ordered it to the order they are on the disk, for faster reading. They then launch it as a background process near the very start of booting. While this still has a nice effect on boot speed, it's not ideal. Because it continuously accesses the media, other processes will have to wait or they go first and it slows down. Also if the process that needs a file is run before readahead reads the file, there will be no effect. So, with DSL I plan to use it in carefully selected parts, like during cpu-using processes. And in pieces, not in one long run. This will make it more effective. Posted by vda on Oct. 25 2007,17:33
[shameless plug]Readahead is available in busybox. >It takes only 3kb when compiled with -Os and stripped In busybox, it takes 104 bytes - 3.5% of 3 Kb. Not bad, eh? By including busybox, DSL will get readahead and ~200 other programs in 700kb of code. [end shameless plug] Posted by curaga on Oct. 26 2007,13:06
DSL already has busybox, and readahead was added in 1.7 I think.
|