You are not logged in.

#1 2009-01-16 19:42:59

FaN_OnLy1
Member
From: Montpellier, France
Registered: 2008-09-22
Posts: 126

Implementing sreadahead on archlinux ?

So, i'm currently trying to implement sreadahead in arch on my custom zen4-MoD kernel, i have patched it with the sreadahead kernel patch. and compiled the sreadahead utilities wich are now present as :

/sbin/sreadahead
/sbin/sreadahead-pack

The README file of sreadahead says :

How distributions should implement sreadahead.

Distributions packaging sreadahead should implement two components:
1) starting sreadahead as early as possible
2) at the end of the boot sequence, generate a pack file if needed

Typically, the following line would be added to the top of
/etc/rc.sysvinit (or equivalent):

        /sbin/sreadahead

This will make sreadahead fork into the background and load an existing
readahead.packed file, and then doing it's work.

If the /etc/readahead.packed file is deleted, the init.d scripts would
typically re-generate this file at the end of a clean boot by adding an
/etc/rc5.d/S99sreadahead-pack script that typically does something like:

        if [ -f /etc/readahead.packed ]; then
                exit 0
        fi
        cd /tmp
        find / -type f \( -fstype ext3 -o -fstype rootfs \) > \
                readahead.packed.new
        generate_filelist readahead.packed.new
        mv readahead.packed.new /etc/readahead.packed

To update the pack file, one can simply remove /etc/readahead.packed and
reboot the system.

So what i have done is put the following lines in /etc/rc.sysinit :

Near the start

/sbin/sreadahead
...
...
Near the end
...
...

if [ -f /etc/readahead.packed ]; then
        exit 0
else
        stat_busy "Checking for sreadahead"
        cd /tmp
        find / -type f \( -fstype ext3 -o -fstype rootfs \) > \
                readahead.packed.new
        generate_filelist readahead.packed.new
        mv readahead.packed.new /etc/readahead.packed
        stat_done
fi

But when doing this, i rebooted and the comp didn't want to boot, as in , the "Checking for sreadahead" task would take forever and stop the comp from booting.

I have also tried starting  /sbin/sreadahead from a shell to see what it would outputs, and it told :

/etc/readahead.packed file not found

and running /sbin/sreadahead-pack doesn't output anything.

Has anyone ever tried doing this ?
Thx

Offline

#2 2009-01-17 17:58:34

FaN_OnLy1
Member
From: Montpellier, France
Registered: 2008-09-22
Posts: 126

Re: Implementing sreadahead on archlinux ?

Anyone ?

Offline

#3 2009-01-18 18:09:56

Duologic
Member
From: Belgium
Registered: 2007-11-11
Posts: 249

Re: Implementing sreadahead on archlinux ?

I've only read about this, same with kernel compiling.
I just don't have the time to do kernel compiling.
Good luck to get this of the ground, I gues there are some user that do compile there kernel and want to put the effort into this project.

Offline

Board footer

Powered by FluxBB