Gentoo Archives: gentoo-user

From: Stroller <stroller@××××××××××××××××××.uk>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Speed up `du'
Date: Sun, 25 May 2008 01:54:26
Message-Id: 9267AE6E-F3E3-4185-80A6-0311DCCCE1E4@stellar.eclipse.co.uk
In Reply to: Re: [gentoo-user] Speed up `du' by Willie Wong
1 On 25 May 2008, at 00:24, Willie Wong wrote:
2
3 > On Sat, May 24, 2008 at 04:49:09PM -0500, Penguin Lover
4 > reader@×××××××.com squawked:
5 >> ...
6 >> I use Reiserfs with default sizes. In some situations like a large
7 >> cache of nntp messages of several GB. I might wait 5-10 minutes
8 >> or more
9 >> for du to get the size of the directory.
10 >
11 > I am pretty sure the problem with du is that it actually looks,
12 > recursively, at every single file and computes the size that way.
13
14 What he said.
15
16 > Or maybe there is some other tool or technique that can quickly tell
17 > me the size of a directory or set of directories.
18
19 Keep all the files in a honkin' big tarball.
20 :P
21 If you need to read these files on the fly then I'm afraid you'll
22 have to write a kernel filesystem extension (or find one?) that will
23 read them out of the tar file, slowing all read & write actions down.
24 But, hey, `du` on the tarball will complete in no time at all!! ;)
25
26 In seriousness, another thing to do is keep these files on a separate
27 partition, if you can. Basically a user's ~ which includes
28 both .maildir and "My HiDef Videos" is non-optimal.
29
30 >> Are there other file systems that can return a result of `du' faster?
31
32
33 All filesystems have their advantages & disadvantages.
34
35 <http://www.debian-administration.org/articles/388>
36 Reading the above I _think_ the test most similar in function to
37 running `du` on many small files is the "Directory listing and file
38 search into the previous file tree" test, at which ResiderFS is fastest.
39
40 I need to look into this myself soon, to try & get best speed at a
41 3gig corpus of email. I was expecting EXT3 to be best - when you
42 create the filesystem you can specify the blocksize. It's possible
43 that the author of the filesystems comparison could have chosen
44 options when formatting his EXT3 disk that affected the speed of the
45 results - a journal would make writes slower, for instance (not sure
46 about reads).
47
48 Stroller.
49 --
50 gentoo-user@l.g.o mailing list

Replies

Subject Author
Re: [gentoo-user] Speed up `du' "Hemmann