* Re: slow directory listing
[not found] ` <4dTCx-2d8-21@gated-at.bofh.it>
@ 2005-06-10 22:12 ` Bodo Eggert
2005-06-13 12:05 ` Ron Peterson
0 siblings, 1 reply; 6+ messages in thread
From: Bodo Eggert @ 2005-06-10 22:12 UTC (permalink / raw)
To: Ron Peterson, linux-kernel
Ron Peterson <rpeterso@mtholyoke.edu> wrote:
> On Fri, Jun 10, 2005 at 10:37:20AM -0400, rpeterso wrote:
>> 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.
>> ...
>> The times taken to do a directory listing are significantly different.
>
> I've become more confused, if that's possible. I was just editing some
> test script in emacs. As part of the script creation process I used the
> M-! command to pipe the output of 'ls /test/a' into a buffer. It
> snapped back almost instantly.
Try ls|cat and take a look at $LS_OPTIONS and $LS_COLORS. I suspect your
ls tries to use some magic on the files to determine the color.
--
Ich danke GMX dafür, die Verwendung meiner Adressen mittels per SPF
verbreiteten Lügen zu sabotieren.
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: slow directory listing
2005-06-10 22:12 ` slow directory listing Bodo Eggert
@ 2005-06-13 12:05 ` Ron Peterson
2005-06-15 11:05 ` Vladimir Saveliev
0 siblings, 1 reply; 6+ messages in thread
From: Ron Peterson @ 2005-06-13 12:05 UTC (permalink / raw)
To: 7eggert; +Cc: linux-kernel
On Sat, Jun 11, 2005 at 12:12:52AM +0200, Bodo Eggert wrote:
> Ron Peterson <rpeterso@mtholyoke.edu> wrote:
> > On Fri, Jun 10, 2005 at 10:37:20AM -0400, rpeterso wrote:
>
> >> 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.
> >> ...
> >> The times taken to do a directory listing are significantly different.
> >
> > I've become more confused, if that's possible. I was just editing some
> > test script in emacs. As part of the script creation process I used the
> > M-! command to pipe the output of 'ls /test/a' into a buffer. It
> > snapped back almost instantly.
>
> Try ls|cat and take a look at $LS_OPTIONS and $LS_COLORS. I suspect your
> ls tries to use some magic on the files to determine the color.
ls was aliased to 'ls -F', it just took me a while to notice...
--
Ron Peterson
Network & Systems Manager
Mount Holyoke College
http://www.mtholyoke.edu/~rpeterso
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: slow directory listing
2005-06-13 12:05 ` Ron Peterson
@ 2005-06-15 11:05 ` Vladimir Saveliev
0 siblings, 0 replies; 6+ messages in thread
From: Vladimir Saveliev @ 2005-06-15 11:05 UTC (permalink / raw)
To: Ron Peterson; +Cc: 7eggert, linux-kernel@vger.kernel.org
Hello
On Mon, 2005-06-13 at 16:05, Ron Peterson wrote:
> On Sat, Jun 11, 2005 at 12:12:52AM +0200, Bodo Eggert wrote:
> > Ron Peterson <rpeterso@mtholyoke.edu> wrote:
> > > On Fri, Jun 10, 2005 at 10:37:20AM -0400, rpeterso wrote:
> >
> > >> 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.
> > >> ...
> > >> The times taken to do a directory listing are significantly different.
> > >
Which filesystem is used for /test?
> > > I've become more confused, if that's possible. I was just editing some
> > > test script in emacs. As part of the script creation process I used the
> > > M-! command to pipe the output of 'ls /test/a' into a buffer. It
> > > snapped back almost instantly.
> >
> > Try ls|cat and take a look at $LS_OPTIONS and $LS_COLORS. I suspect your
> > ls tries to use some magic on the files to determine the color.
>
> ls was aliased to 'ls -F', it just took me a while to notice...
^ permalink raw reply [flat|nested] 6+ messages in thread
* slow directory listing
@ 2005-06-10 14:37 Ron Peterson
2005-06-10 15:21 ` Ron Peterson
2005-06-13 6:41 ` David Weinehall
0 siblings, 2 replies; 6+ messages in thread
From: Ron Peterson @ 2005-06-10 14:37 UTC (permalink / raw)
To: linux-kernel
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: slow directory listing
2005-06-10 14:37 Ron Peterson
@ 2005-06-10 15:21 ` Ron Peterson
2005-06-13 6:41 ` David Weinehall
1 sibling, 0 replies; 6+ messages in thread
From: Ron Peterson @ 2005-06-10 15:21 UTC (permalink / raw)
To: linux-kernel
On Fri, Jun 10, 2005 at 10:37:20AM -0400, rpeterso wrote:
> 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.
> ...
> The times taken to do a directory listing are significantly different.
I've become more confused, if that's possible. I was just editing some
test script in emacs. As part of the script creation process I used the
M-! command to pipe the output of 'ls /test/a' into a buffer. It
snapped back almost instantly.
So this seems to have something to do w/ bash, not filesystems. I
think. So seems OT for this list, but I still don't understand where
the sluggishness comes from.
BTW, I just did the same test w/ XFS and the results were almost
identical.
Best.
--
Ron Peterson
Network & Systems Manager
Mount Holyoke College
http://www.mtholyoke.edu/~rpeterso
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: slow directory listing
2005-06-10 14:37 Ron Peterson
2005-06-10 15:21 ` Ron Peterson
@ 2005-06-13 6:41 ` David Weinehall
1 sibling, 0 replies; 6+ messages in thread
From: David Weinehall @ 2005-06-13 6:41 UTC (permalink / raw)
To: Ron Peterson; +Cc: linux-kernel
On Fri, Jun 10, 2005 at 10:37:20AM -0400, Ron Peterson wrote:
[snip]
> The times taken to do a directory listing are significantly different.
>
> 1037# time ls /test/a2 > /dev/null
[snip]
Do you get the same results if you use ls with the -U (unsorted) flag?
Regards: David Weinehall
--
/) David Weinehall <tao@acc.umu.se> /) Northern lights wander (\
// Maintainer of the v2.0 kernel // Dance across the winter sky //
\) http://www.acc.umu.se/~tao/ (/ Full colour fire (/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-06-15 11:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <4dSQ6-1vz-27@gated-at.bofh.it>
[not found] ` <4dTCx-2d8-21@gated-at.bofh.it>
2005-06-10 22:12 ` slow directory listing Bodo Eggert
2005-06-13 12:05 ` Ron Peterson
2005-06-15 11:05 ` Vladimir Saveliev
2005-06-10 14:37 Ron Peterson
2005-06-10 15:21 ` Ron Peterson
2005-06-13 6:41 ` David Weinehall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox