Mailing List Archive

Speeding up program starts with squashfs
deer, list!

I currently try to minimize the application startup-time for my gentoo-laptop.
Even with prelink it takes about one minute to start kde and all programs in
autostart due to the heavy disk i/o load.
In the last days I did some tests with taking a copy of my regular /usr (ext3)
dir and storing it in a squashfs file. I then mount it as loopback device
on /usr. (Leaving the original copy still intact but hidden.)

Those are the effects I try to achieve:
1. The filesystem has no fragmentation at all. Files in my regular /usr dir
are somewhat fragmented, but not too badly.
2. It's compressed: less disk i/o and more cpu load.

So far the results have been promising. With the new squashfs I'm down to
around 50 secs (-16%). But at the moment my benchmark methods are quite
primitve. I simply have a stopwatch nearby and meassure the time from login
to when the disk is idle again. I'm looking forward to some input on this.

greets
Roman
Re: Speeding up program starts with squashfs [ In reply to ]
You may want to look into using ReadAhead, some of the newer init systems
are using it to decrease boot time.



On 5/9/07, Roman Zimmermann <mereandor@gmail.com> wrote:
>
> deer, list!
>
> I currently try to minimize the application startup-time for my
> gentoo-laptop.
> Even with prelink it takes about one minute to start kde and all programs
> in
> autostart due to the heavy disk i/o load.
> In the last days I did some tests with taking a copy of my regular /usr
> (ext3)
> dir and storing it in a squashfs file. I then mount it as loopback device
> on /usr. (Leaving the original copy still intact but hidden.)
>
> Those are the effects I try to achieve:
> 1. The filesystem has no fragmentation at all. Files in my regular /usr
> dir
> are somewhat fragmented, but not too badly.
> 2. It's compressed: less disk i/o and more cpu load.
>
> So far the results have been promising. With the new squashfs I'm down to
> around 50 secs (-16%). But at the moment my benchmark methods are quite
> primitve. I simply have a stopwatch nearby and meassure the time from
> login
> to when the disk is idle again. I'm looking forward to some input on this.
>
> greets
> Roman
>
>


--
---------------------------------
Derek Tracy
tracyde@gmail.com
---------------------------------
Re: Speeding up program starts with squashfs [ In reply to ]
Am Mittwoch 09 Mai 2007 21:28 schrieb Derek Tracy:
> You may want to look into using ReadAhead, some of the newer init systems
> are using it to decrease boot time.

Sorry, I think you missunderstood something: I already using readahead and
it's not boot time I'm interested in. This is currently the smaller amount of
time.
I'm interested in program start times _after_ the system is booted.

Thanks for answering though.

Roman
Re: Speeding up program starts with squashfs [ In reply to ]
On 5/9/07, Roman Zimmermann <mereandor@gmail.com> wrote:
>
> Am Mittwoch 09 Mai 2007 21:28 schrieb Derek Tracy:
> > You may want to look into using ReadAhead, some of the newer init
> systems
> > are using it to decrease boot time.
>
> Sorry, I think you missunderstood something: I already using readahead and
> it's not boot time I'm interested in. This is currently the smaller amount
> of
> time.
> I'm interested in program start times _after_ the system is booted.
>
> Thanks for answering though.
>
> Roman
>
>
Right but isn't it possible to utilize readahead to "pre-load" a ramdisk,
that way the io is happening before X is even ready to come up.



--
---------------------------------
Derek Tracy
tracyde@gmail.com
---------------------------------
Re: Speeding up program starts with squashfs [ In reply to ]
I can't speak about squashfs. However, as Derek Tracy eluded to, you can do
other things to improve performance such as running a different init system. I
remembering trying init-ng a while back and it ran fine, but I didn't want to
take the time to mess with it too much and reverted back to sysVinit. There is
a wiki on different init systems [1].

You may also want to check the forums for discussions on bootchart. This is a
boot time monitor that generates graphs of load times. I've never run it, but
people seem to get a lot of success from it. Hopefully that's some useful place
to start even if it's not related to squashfs.

[1] http://gentoo-wiki.com/TIP_Speed_up_your_boot_time
--
gentoo-performance@gentoo.org mailing list
Re: Speeding up program starts with squashfs [ In reply to ]
On 5/9/07, lnxg33k <lnxg33k@gmail.com> wrote:
>
> I can't speak about squashfs. However, as Derek Tracy eluded to, you can
> do
> other things to improve performance such as running a different init
> system. I
> remembering trying init-ng a while back and it ran fine, but I didn't want
> to
> take the time to mess with it too much and reverted back to sysVinit.
> There is
> a wiki on different init systems [1].
>
> You may also want to check the forums for discussions on bootchart. This
> is a
> boot time monitor that generates graphs of load times. I've never run it,
> but
> people seem to get a lot of success from it. Hopefully that's some useful
> place
> to start even if it's not related to squashfs.
>
> [1] http://gentoo-wiki.com/TIP_Speed_up_your_boot_time
> --
> gentoo-performance@gentoo.org mailing list
>
>
lnxg33k

Roman isn't looking to speed up his boot, he is looking to speed up
application startup times after boot. I was eluding to the possibility to
use Readahead to pre-load a ramdisk immediately after the OS boots. I
didn't want to throw his e-mail off topic.


--
---------------------------------
Derek Tracy
tracyde@gmail.com
---------------------------------
Re: Speeding up program starts with squashfs [ In reply to ]
Am Mittwoch 09 Mai 2007 21:46 schrieb Derek Tracy:
> Right but isn't it possible to utilize readahead to "pre-load" a ramdisk,
> that way the io is happening before X is even ready to come up.

That sounds more interesting now. I think I did mean something else with
readahead at first. So if I really want to speed up things (more) there is no
way around replacing sysvinit? (Still sounds a bit scary to me ...)