This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Performance of "ls -F"


In my particular case, we're seeing this behavior:

7-mode: (//devnas04/largedisk/bsmith/netapp)

:$ //devnas04/largedisk/bsmith/netapp>time ls -ld struct5*
-rw-r--r-- 1 bsmith Domain Users 0 Nov  5 10:25 struct51.log
[snipped]
-rw-r--r-- 1 bsmith Domain Users 0 Nov  5 10:26 struct5z.prf

real    0m1.308s
user    0m0.031s
sys     0m0.125s


cdot-mode: (//rdlserv/testdata/rdl117_nt/test)

:$ //rdlserv/testdata/rdl117_nt/test>time ls -ld struct5*
-rwxrwx---+ 1 Unknown+User Unknown+Group 23047 Nov  4 21:47 struct51.log
[snipped]
-rwxr-x---+ 1 Unknown+User Unknown+Group   595 Oct 31 23:53 struct5z.prf

real    1m7.698s
user    0m0.249s
sys     0m11.484s

The difference is 1.3 seconds versus 1 minute 7 seconds.  The directory is identical on the two NetApps and they both contain ~29K files.  C-dot (Cluster Data On Tap) is the newest operating system for the NetApp.  It also supports the newer SMB protocols.

I also tried the experiment with MKS Toolkit 8.6 and in both cases, it takes around .1 seconds.



> -----Original Message-----
> From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] On
> Behalf Of William M. (Mike) Miller
> Sent: Thursday, January 21, 2016 10:53 AM
> To: cygwin@cygwin.com
> Subject: Re: Performance of "ls -F"
> 
> On Thu, Jan 21, 2016 at 10:44 AM, Achim Gratz <Stromeko@nexgo.de>
> wrote:
> > I am finding a large performance gap between plain "ls" and "ls -F" in
> > a directory with many files on a network share (NetApp disguised as
> > NTFS if that matters).  This has been there for quite a while, I've
> > just now realized what the reason was (I have "ls -F" as an alias for
> > "ls" in my interactive shells).  In a directory with 1300 files, a
> > plain "ls" completes in 0.3s, while "ls -F" requires about 95s.
> > Determining the file class seems to require around 70...90ms per file,
> > which I can confirm also for directories with a lot less files.
> > What's involved in that determination that takes such a long time?
> 
> The overhead appears to be in checking for executable files; using --file-type
> instead of -F, which just omits the '*' category, reduces the time for ls in one
> of my (local) large directories from over one second to 0.04 seconds.
> 
> --
> William M. (Mike) Miller | Edison Design Group william.m.miller@gmail.com
> 
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]