2009-11-15 10:39:55

by Christian Volkmann

[permalink] [raw]
Subject: Does a kernel assisted file system reorder make sense?

Hi,

I just have read some articles about faster booting systems
(Ubuntu 9.10) , SSD, hard disks, latency and seek times...

Due to this I have some ideas which I like to discuss.
I am for sure not the first with this idea, but I do not
find any discussion about it. :)

Shouldn't it be possible for the kernel to provide an ordered
loaded block list read from disk ? This could be used for a kind
of "forced reorder" for a file system tool.

May be this would also fasten the system start from a hard disk.
I could imagine a scenario like:
- kernel start (boot loader )
- kernel to keep a list of the read blocks (on a per filesystem base)
- kernel to log this list just before init starts.
- on demand: kernel to continue the recording
- on demand: kernel can signaled to log this list.
(e.g. graphic log in ready )

This logged list could be use from a new tool like "e2reorder"
for ext2/3/4 to reorder the blocks within the file system(s) to
reduce the seek delay for a start from a hard disk.

The logged list could also be used as a "to load/cache first" list
for the kernel/initrd boot. This might fasten the start without
special file system tools or for file systems without support.

But this would only make sense if a system boot is delayed by
hard disk seek times. I have no SSD to check if a SSD boots
faster. Does anyone have the experience if a SSD boots faster?

Best regards,

Christian


2009-11-15 12:09:19

by Alexander Clouter

[permalink] [raw]
Subject: Re: Does a kernel assisted file system reorder make sense?

Christian Volkmann <[email protected]> wrote:
>
> I just have read some articles about faster booting systems
> (Ubuntu 9.10) , SSD, hard disks, latency and seek times...
>
> Due to this I have some ideas which I like to discuss.
> I am for sure not the first with this idea, but I do not
> find any discussion about it. :)
>
> [snipped]
>
> But this would only make sense if a system boot is delayed by
> hard disk seek times. I have no SSD to check if a SSD boots
> faster. Does anyone have the experience if a SSD boots faster?
>
...be faster still just to suspend/resume to RAM or disk surely?

I like to reduce my boot time by...erm...not booting :)

Cheers

--
Alexander Clouter
.sigmonster says: It is the wise bird who builds his nest in a tree.

2009-11-15 13:37:33

by Andi Kleen

[permalink] [raw]
Subject: Re: Does a kernel assisted file system reorder make sense?

Christian Volkmann <[email protected]> writes:

> Hi,
>
> I just have read some articles about faster booting systems
> (Ubuntu 9.10) , SSD, hard disks, latency and seek times...
>
> Due to this I have some ideas which I like to discuss.
> I am for sure not the first with this idea, but I do not
> find any discussion about it. :)

Most modern distributions these days use some variant of prefetch at
boot.

> Shouldn't it be possible for the kernel to provide an ordered
> loaded block list read from disk ? This could be used for a kind
> of "forced reorder" for a file system tool.

Typically it's enough to just collect all the blocks read at boot and
then prefetch them in order to minimize seeks. That's what various
distributions do, typically by using blktrace to generate these lists
and then suitable prefetch daemons. Sometimes it's also just done at
the file level, because that's often also good enough.

The suse preload package also has a e2remapblocks for remapping inside
individual files, but I don't think it helps all that much. At least
it's not used by default.

-Andi


--
[email protected] -- Speaking for myself only.