ls -lR too slow

Vinod Gupta vinod@Princeton.EDU
Fri Mar 20 02:25:00 GMT 2009


> Dave Korn wrote:
>> Vinod Gupta wrote:
>>
>>> When I do "ls -lR /cygdrive/z" it takes very long.
>>> There are only about 700 files on Z: totalling only 100 MB. When I
>>> monitor network counters on laptop, I see that a whopping 90 MB were
>>> downloaded for a payload (file list) of only 60 KB. Out of curiosity, I
>>> did the same experiment between two linux machines configured as NFS
>>> client+server. 
>>
>>   Perhaps more instructive would be to compare with typing "DIR Z:" 
>> in a DOS
>> prompt.  How much time does that take, and how much network traffic 
>> does it
>> generate, by comparison?
>
> If the OP is looking for truer comparisons with Linux, I would say that
> using SAMBA on Linux is a better test than NFS.  Of course, Cygwin is
> expected to be slower than Linux regardless.
>
> In terms of overall time/traffic with Cygwin, I'd recommend comparing the
> results of "DIR Z:" that Dave recommends above to "ls /cygdrive/z" (or
> "DIR /S Z:" to "ls -R /cygdrive/z").  If you need to use "-l" with "ls"
> and remote SAMBA shares, I'd recommend adding "smbntsec" to your "CYGWIN"
> environment variable.  This should limit file accesses that "-l" (and 
> other
> flags) can require.  See the link below for more info:
>
> <http://cygwin.com/cygwin-ug-net/using-cygwinenv.html>
>
> -- 
> Larry Hall                              http://www.rfk.com
> RFK Partners, Inc.                      (508) 893-9779 - RFK Office
> 216 Dalton Rd.                          (508) 893-9889 - FAX
> Holliston, MA 01746
>
> _____________________________________________________________________

"smbntsec" made a huge difference, a factor of 10x! "ls -lR /cygdrive/z" 
still transferred 10 MB, 50x more than "DIR /S Z:" but far better than 
400x it was doing with "nosmbntsec". It improves rsync too which does 
some thing similar to "ls -lR" to get file mtime and size etc to filter 
files. I think 50x factor sounds still too high. I thought the Cygwin 
overheads were of the order of 3x or so. Can we squeeze another order of 
magnitude?

Thanks Larry,
Vinod


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list