At Sat, 24 May 2008 16:49:09 -0500 [EMAIL PROTECTED] wrote:

> Is there any way to speed up the du command?  I mean short of having
> cron run it on target directories and store results.  (not really
> speeding up but at least not having to wait for a result)
>
> I've seen various mention of du being slow but don't recall any
> mentions of how to speed it up.
>
> I use Reiserfs with default sizes.  In some situations like a large
> cache of nntp messages of several GB.  I might wait 5-10 minutes or more
> for du to get the size of the directory. 
>
> Are there other file systems that can return a result of `du' faster?
>
> I'm curious how `df' computes sizes so much quicker.  Even after
> rm'ing a large amount of data... `df' sees the difference right away.

I can't help with speeding up du, but can explain df's speed.
This information is kept in the superblock.  Each operation that
changes size updates the superblock and df just reads the result.
(In a sense it is like your cron soln above for du :-) .)

> Or maybe there is some other tool or technique that can quickly tell
> me the size of a directory or set of directories.

allan
-- 
gentoo-user@lists.gentoo.org mailing list

Reply via email to