Re: Logging disk accesses.

Etienne Lorrain (lorrain@fb.sony.de)
Wed, 3 Jun 1998 11:23:58 +0001


Hi,

> > It would be astonishing to have this collect access patters for
> > a few weeks. Then have a process that finds sets of blocks that
> > are often read togeather, then finaly a defragger that takes
> > block orders.
>
> I wrote the kernel support, Someone go ahead and write the other
> pieces. This is what it is intended to do. (The logger is easy:
> tail -10000f /proc/blkdev_log >> /var/log/blkdev_log

Considering that it is difficult or impossible to have
the hardware layout of the hard disk, to put nearby the
frequently accessed blocks (i.e. put together in the same
tracks the most accessed 10 Mbytes of the 10 Gbytes disk),
it may be better to work at the file level: get the name
of frequently accessed files, and if they are small enough,
copy them (they will probably added to the big free hole),
move the old one in a directory (to be cleaned every month),
and rename the new file to the initial name.

It is not fool prof but it is then a userland daemon - and
may worth to be tried... Another solution is to backup the
complete disk, clear it, and restore every files - but in
a special order.

Etienne.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu