|
|
Darren New wrote:
> Nicolas Alvarez wrote:
>> There is a tool that records file reads. You configure it to run, then
>> reboot, and login, maybe open some apps you usually use. Next time you
>> reboot, another tool will read the recorded log and use the readahead
>> syscall on them. The file list is even sorted by their physical location
>> on the disk.
>
> Yeah, XP has that built in, and Vista to an even greater extent. But they
> only work on (AFAIU) the demand-paged blocks, not entire files. Does the
> Linux tool read an entire file, or just the parts that were paged in at
> start-up? I suspect 5 seconds would be plenty to read all the login files
> if the heads didn't thrash like mad.
>
> It just seems like it could be done better. :-)
The command-line tools work in terms of whole files. The syscall takes a
file descriptor and a byte range.
readahead-watch(8): Watches the mount points given, or the root filesystem,
for files opened during the boot sequence and closed without writing to
them. Orders the list by on-disk position and then writes it to the output
file.
readahead-list(8): Loads lists from the given file and performs readahead(2)
on each entry.
readahead(2): populates the page cache with data from a file so that
subsequent reads from that file will not block on disk I/O.
Post a reply to this message
|
|