public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ron Peterson <rpeterso@mtholyoke.edu>
To: linux-kernel@vger.kernel.org
Subject: slow directory listing
Date: Fri, 10 Jun 2005 10:37:20 -0400	[thread overview]
Message-ID: <20050610143720.GA14454@mtholyoke.edu> (raw)

I'm setting up a new mail server, and am testing/tweaking IO.  I have
two directories: /test/a which contains 750 mbox files totalling 8GB,
and /test/a2, which contains the exact same number of files, same names,
all zero length.

I am using ext3.  I have done this experiment with both indexed and
non-indexed directories (mke2fs -O dir_index ...).  I have also tried
setting the noatime mount option.

The times taken to do a directory listing are significantly different.

1037# time ls /test/a2 > /dev/null

real    0m0.006s
user    0m0.000s
sys     0m0.006s

1038# time ls /test/a > /dev/null

real    0m5.244s
user    0m4.875s
sys     0m0.346s

If I refer to a specific file, there's still a difference, but only 5x,
vs. 875x above.

1044# time ls a/anmbox > /dev/null

real    0m0.010s
user    0m0.009s
sys     0m0.002s

Fri Jun 10 10:31:02 root@slush:/db/tmp
1045# time ls a2/anmbox > /dev/null

real    0m0.002s
user    0m0.001s
sys     0m0.001s

I'm assuming this is normal behaviour.  (?)  However, I'd like to
understand what's happening a little better, and I'm wondering if
there's anything I'm overlooking vis-a-vis tuning my filesystem properly
for this type of application.

Linux 2.6.11.11 on Debian Sarge.  Dell 2800 w/ LSI Megaraid on PCI/E to
Utra320 SCSI disks.

-- 
Ron Peterson
Network & Systems Manager
Mount Holyoke College
http://www.mtholyoke.edu/~rpeterso

             reply	other threads:[~2005-06-10 14:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-10 14:37 Ron Peterson [this message]
2005-06-10 15:21 ` slow directory listing Ron Peterson
2005-06-13  6:41 ` David Weinehall
     [not found] <4dSQ6-1vz-27@gated-at.bofh.it>
     [not found] ` <4dTCx-2d8-21@gated-at.bofh.it>
2005-06-10 22:12   ` Bodo Eggert
2005-06-13 12:05     ` Ron Peterson
2005-06-15 11:05       ` Vladimir Saveliev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050610143720.GA14454@mtholyoke.edu \
    --to=rpeterso@mtholyoke.edu \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox