# requirements for using ureadahead

## jordanwb

Even though my laptop schools my desktop machine (specs are in sig) in terms of boot time, I think it can start faster. What would I need to do to implement ureadahead? I saw a bug report on the gentoo bugzilla where a user supplied an ebuild but I can't find it on gentoo-portage.com and I don't know what to do with it.

----------

## mikegpitt

I believe ureadahead is much like sys-apps/readahead-list, if you want to try out that package.  I've messed around with this in the past, and actually wrote my own custom readahead script that grabbed some profiled files from lsof and "loaded" them by cat'ing them to /dev/null at each boot.

One thing to note is that using such packages will slow down your boot, since it needs to load all these files into memory.  After boot, however, it will make your applications load quicker, and perhaps your window manager depending on when you execute the readahead script.

----------

## Tom_

@mikegpitt, could you please copy/paste your script ? 

Thank you in advance!

----------

## mikegpitt

 *Tom_ wrote:*   

> @mikegpitt, could you please copy/paste your script ? 
> 
> Thank you in advance!

 Sorry, that was on an older machine and I don't have it anymore.  Essentially, I would use a perl script to parse the lsof output right after a fresh boot, and again after I opened some commonly used applications.  These would be the applications that I would want to load quickly.  These results were then hashed, to ensure no duplicate files were reported, and then stored in a file.  On boot I would have another script parse this file and simply cat each to /dev/null.  This is a reasonably quick operation and loads each file into memory.  I believe the script took about 5-7 seconds to run, but shaved subsequent time loading any of my standard desktop applications, and window manager.

----------

## jordanwb

Seems simple enough to do. I don't know Perl, would Python work even though it's an interpreted language?

I found this which I could use. This seems to be something on my skill level. Of course I tend to over-estimate a problem's complexity.

I found pyinotify which will work better.

----------

