speedy du?

I'm using the command:

du --max-depth=1 -h /home

To get a "quick" (yeah right) overview of my user's disk usage.  The problem is, that it takes between 20 and 35 minutes to finish displaying the results.  And that's with under 20 users!  I plan on having a couple hundred!

The machine is only a few months old, but it is kind of low-end (2.4Ghz Celeron, IDE drives) - however, I can't imagine that really being the problem.

Windows can report back file size on folders dozens deep containing tens of thousands of files in a couple of minutes... is there a way to achieve this with Linux (indexing?).

Thanks.
s_mackAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

jlevieCommented:
The time required for du to work on a given disk is essentially a funcion of the number of files/dirs it has to check. For each file du executes a stat() to determine the size.

Unless you've got a lot of data already in /home it seems to me that 20-35 minutes is way too long.  The laptop I'm using right now has about 43k files using about 25Gb of disk. Executing 'du --max-depth=1 -h /home' takes about 15 seconds. So I wonder if you've got some sort of a problem with disk I/O or memory starvation?
0
s_mackAuthor Commented:
well, the home directory is 170GB with ~1.2 million files.  I didn't realize there were that many files, so maybe it just takes that long.
0
jlevieCommented:
That would take a while.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

s_mackAuthor Commented:
Is there anything other than DU that could perhaps give a summary quicker?

I mean - df does its job in seconds, regardless of how much data is used.  I suppose I could mount each user seperately and just use df... but is there perhaps a df-like utility that could work for me?  I don't need the detail that du does.. .just a summary.
0
jlevieCommented:
Do you need it frequently, of would daily suffice? If a daily report is acceptable you could generate the  stats from a cron job run sometime at night with the results dropped in a file.

I don't know of anything that's going to be faster than du.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
s_mackAuthor Commented:
Thanks.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.