Re: ls problem
On Mon, 18 Nov 2002, Carlo Florendo wrote: > Hello, > > I've been using cygwin for 3 years now and last week, I downloaded the > latest cygwin from one of the mirrors and everything in well except for one > problem. I noticed that whenever I type 'ls -', the output gets delayed for > a few seconds. This never happened to me using the old cygwin. I checked > the man pages of ls and I didn't find a clue on how to make its output > faster. > > I got to the /bin directory and did a 'time ls -l' and these are the > results. > > real0m3.942s > user0m0.249s > sys 0m0.530s > > This is my current bash version : > > $ bash --version > GNU bash, version 2.05b.0(5)-release (i686-pc-cygwin) > Copyright (C) 2002 Free Software Foundation, Inc. > > Then, the current ls version: > > $ ls --version > ls (fileutils) 4.1 > Written by Richard Stallman and David MacKenzie. > > Copyright (C) 2001 Free Software Foundation, Inc. > > The fileutils version is "fileutils-4.1-1". > > The queer thing is that the fileutils version of my former cygwin package is > exactly the same as with the new one. > Any help to fix the problem? > > Thanks a lot! > > Best Regards, > > Carlo Florendo > Astra (Philippines) Inc. > [EMAIL PROTECTED] Carlo, It would have been more helpful if you had provided your cygwin version, but even without it I could venture a guess... The latest versions of cygwin have ntsec on by default, and doing 'ls -l' will result in the user lookup in the /etc/passwd (and /etc/group) file. An easy way to test that is to time 'ls -ln' and see if it's faster. Another test would be to *temporarily* turn off ntsec (by adding "nontsec" to your CYGWIN environment variable and reloading cygwin1.dll by exiting all running cygwin processes). I say temporarily because ntsec is actually a very useful feature to have on, and this is suggested only as a means to find out whether it's the culprit. You can restore the state by either changing "nontsec" to "ntsec", or leaving it off altogether, as it's the default now, and reloading cygwin1.dll again. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "Water molecules expand as they grow warmer" (C) Popular Science, Oct'02, p.51 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: ls problem
Thanks for the info. I've read the FAQ and it mentioned something about the // notation on the PATH environment variable. I checked my PATH variable and there was no presence of the // notation. I then set the PATH to include only the usual bin directories but "ls -l" is still considerably slow. I try both "time ls -b" and "time ls -l" and there is considerable difference. The cygwin1.dll version I am using is 1.3.15-cygwin-1-3-15-1. fcarlo@ZEUS~ $ time ls -b a b test real0m0.024s user0m0.030s sys 0m0.015s fcarlo@ZEUS ~ $ time ls -l total 11 -rw-r--r--1 fcarlo None5 Nov 19 13:58 a -rw-r--r--1 fcarlo None5 Nov 19 13:58 b -rw-r--r--1 fcarlo None 8283 Nov 19 13:59 test real0m1.819s user0m0.030s sys 0m0.000s > On Monday 18 Nov 02, Carlo Florendo writes: > > Hello, > > > > I've been using cygwin for 3 years now and last week, I downloaded the > > latest cygwin from one of the mirrors and everything in well except for one > > problem. I noticed that whenever I type 'ls -', the output gets delayed for > > a few seconds. This never happened to me using the old cygwin. > > There is a FAQ entry, "Why is Cygwin suddenly *so* slow?". Maybe it > describes your problem. > > Regards, > David > > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: ls problem
Hi Igor, I tried disabling ntsec and "ls -l" is still slow. I'm using 1.3.15-cygwin-1-3-15-1. "ls -l" and "ls -ln" takes almost the same amount of time.On a directory with 3 short text files, the difference, when I timed "ls -l" and "ls -b", is still considerable. fcarlo@ZEUS~ $ time ls -b a b test real0m0.024s user0m0.030s sys 0m0.015s fcarlo@ZEUS ~ $ time ls -l total 11 -rw-r--r--1 fcarlo None5 Nov 19 13:58 a -rw-r--r--1 fcarlo None5 Nov 19 13:58 b -rw-r--r--1 fcarlo None 8283 Nov 19 13:59 test real0m1.819s user0m0.030s sys 0m0.000s Best Regards, Carlo Florendo > > Carlo, > It would have been more helpful if you had provided your cygwin version, > but even without it I could venture a guess... The latest versions of > cygwin have ntsec on by default, and doing 'ls -l' will result in the user > lookup in the /etc/passwd (and /etc/group) file. An easy way to test that > is to time 'ls -ln' and see if it's faster. Another test would be to > *temporarily* turn off ntsec (by adding "nontsec" to your CYGWIN > environment variable and reloading cygwin1.dll by exiting all running > cygwin processes). I say temporarily because ntsec is actually a very > useful feature to have on, and this is suggested only as a means to find > out whether it's the culprit. You can restore the state by either > changing "nontsec" to "ntsec", or leaving it off altogether, as it's the > default now, and reloading cygwin1.dll again. > Igor > -- > http://cs.nyu.edu/~pechtcha/ > |\ _,,,---,,_ [EMAIL PROTECTED] > ZZZzz /,`.-'`'-. ;-;;,_ [EMAIL PROTECTED] > |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski > '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! > > "Water molecules expand as they grow warmer" (C) Popular Science, Oct'02, p.51 > > > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Bug reporting: http://cygwin.com/bugs.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ > > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: ls problem
Carlo, I think your next step must be to run "ls" under "strace" and see where the excess time (presumably idle time) is going. Randall Schulz Mountain View, CA USA At 17:00 2002-11-19, Carlo Florendo wrote: Hi Igor, I tried disabling ntsec and "ls -l" is still slow. I'm using 1.3.15-cygwin-1-3-15-1. "ls -l" and "ls -ln" takes almost the same amount of time.On a directory with 3 short text files, the difference, when I timed "ls -l" and "ls -b", is still considerable. fcarlo@ZEUS~ $ time ls -b a b test real0m0.024s user0m0.030s sys 0m0.015s fcarlo@ZEUS ~ $ time ls -l total 11 -rw-r--r--1 fcarlo None5 Nov 19 13:58 a -rw-r--r--1 fcarlo None5 Nov 19 13:58 b -rw-r--r--1 fcarlo None 8283 Nov 19 13:59 test real0m1.819s user0m0.030s sys 0m0.000s Best Regards, Carlo Florendo -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: ls problem
Carlo, The difference between 'ls' and 'ls -l' is that 'ls -l' actually performs a stat() call on every file in the directory, whereas 'ls' simply reads the directory contents and doesn't touch the files. Therefore, the files themselves (or, rather, the stat records for them) need to be in disk cache along with the directory, otherwise it'll take some time to load them from disk. Try running 'ls -l' first to pull the directory contents and the stat records for the files into memory, and then repeating both 'time ls' and 'time ls -l' commands, and see if that makes a difference in the timings. FYI, 'ls -l' is *supposed* to be slower, because it accesses more information. On my machine (P3 700MHz running Win2k Pro SP3), the timings are as follows: $ cd /bin && ls -l > /dev/null $ ls | wc -l 658 $ time ls > /dev/null real0m1.140s user0m0.180s sys 0m0.851s $ time ls -l > /dev/null real0m1.917s user0m0.370s sys 0m1.421s $ Igor On Tue, 19 Nov 2002, Carlo Florendo wrote: > Hi Igor, > > I tried disabling ntsec and "ls -l" is still slow. I'm using > 1.3.15-cygwin-1-3-15-1. "ls -l" and "ls -ln" takes almost the same amount > of time.On a directory with 3 short text files, the difference, when I > timed "ls -l" and "ls -b", is still considerable. > > fcarlo@ZEUS~ > $ time ls -b > a b test > > real0m0.024s > user0m0.030s > sys 0m0.015s > > fcarlo@ZEUS ~ > $ time ls -l > total 11 > -rw-r--r--1 fcarlo None5 Nov 19 13:58 a > -rw-r--r--1 fcarlo None5 Nov 19 13:58 b > -rw-r--r--1 fcarlo None 8283 Nov 19 13:59 test > > real0m1.819s > user0m0.030s > sys 0m0.000s > > Best Regards, > > Carlo Florendo > > > Carlo, > > It would have been more helpful if you had provided your cygwin version, > > but even without it I could venture a guess... The latest versions of > > cygwin have ntsec on by default, and doing 'ls -l' will result in the user > > lookup in the /etc/passwd (and /etc/group) file. An easy way to test that > > is to time 'ls -ln' and see if it's faster. Another test would be to > > *temporarily* turn off ntsec (by adding "nontsec" to your CYGWIN > > environment variable and reloading cygwin1.dll by exiting all running > > cygwin processes). I say temporarily because ntsec is actually a very > > useful feature to have on, and this is suggested only as a means to find > > out whether it's the culprit. You can restore the state by either > > changing "nontsec" to "ntsec", or leaving it off altogether, as it's the > > default now, and reloading cygwin1.dll again. > > Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "Water molecules expand as they grow warmer" (C) Popular Science, Oct'02, p.51 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: ls problem
- Original Message - From: "Igor Pechtchanski" <[EMAIL PROTECTED]> To: "Carlo Florendo" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, November 19, 2002 8:56 AM Subject: Re: ls problem > > Try running 'ls -l' first to pull the directory contents and the stat > records for the files into memory, and then repeating both 'time ls' and > 'time ls -l' commands, and see if that makes a difference in the timings. Ok, done! I actually repeated the operation many times. However, there is still considerable difference. I'm wondering why "ls -l" is slower now than my previous version of cygwin. They're both using fileutils-4.1.1. I try the same thing in my linux box and doing "ls -l" doesn't take that slow. It's only with this new version of cygwin that I experienced a slow response to "ls -l". > > FYI, 'ls -l' is *supposed* to be slower, because it accesses more > information. On my machine (P3 700MHz running Win2k Pro SP3), the timings > are as follows: > On Tue, 19 Nov 2002, Carlo Florendo wrote: That's right. It's supposed to be slower because it accesses more information but the speed should not be very signiicantly slower. BTW, I'm using a P4 1.7GHz, Win2k. My home PC is a P3 600MHz and it runs on the older version of cygwin. Doing an "ls -l" on the slower P3 PC with the older version of cygwin is still faster than doing a "ls -l" on my P4 with the newer version of cygwin. What actually happens is that after ls prints the "total ", it processes for a while--this is where the slower part begins, then outputs the directory entries. It takes more than 1 second to print the directory entries. Still any hints? Thanks a lot! Carlo Carlo Florendo Astra (Philippines), Inc. Email: [EMAIL PROTECTED] Web: http://www.astra.ph -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: ls problem
I don't know how to interpret the output of strace so I just included it here as ls-output.bz2. I hope this helps us see the problem. Thanks! - Original Message - From: "Randall R Schulz" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 19, 2002 7:45 AM Subject: Re: ls problem > Carlo, > > I think your next step must be to run "ls" under "strace" and see where the > excess time (presumably idle time) is going. > > Randall Schulz > Mountain View, CA USA > > > At 17:00 2002-11-19, Carlo Florendo wrote: > >Hi Igor, > > > >I tried disabling ntsec and "ls -l" is still slow. I'm using > >1.3.15-cygwin-1-3-15-1. "ls -l" and "ls -ln" takes almost the same amount > >of time.On a directory with 3 short text files, the difference, when I > >timed "ls -l" and "ls -b", is still considerable. > > > >fcarlo@ZEUS~ > >$ time ls -b > >a b test > > > >real0m0.024s > >user0m0.030s > >sys 0m0.015s > > > >fcarlo@ZEUS ~ > >$ time ls -l > >total 11 > >-rw-r--r--1 fcarlo None5 Nov 19 13:58 a > >-rw-r--r--1 fcarlo None5 Nov 19 13:58 b > >-rw-r--r--1 fcarlo None 8283 Nov 19 13:59 test > > > >real0m1.819s > >user0m0.030s > >sys 0m0.000s > > > >Best Regards, > > > >Carlo Florendo > > > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Bug reporting: http://cygwin.com/bugs.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ > > ls-output.bz2 Description: Binary data -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: ls problem
On Wed, Nov 20, 2002 at 11:48:10AM -0800, Carlo Florendo wrote: > I don't know how to interpret the output of strace so I just included it > here as ls-output.bz2. I hope this helps us see the problem. There is a huge delay accessing F:\cygwin\usr\local\etc\zoneinfo\posixrules, on your F: drive. What's that? Pierre -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: ls problem
On Tue, Nov 19, 2002 at 10:56:49PM -0500, Pierre A. Humblet wrote: > On Wed, Nov 20, 2002 at 11:48:10AM -0800, Carlo Florendo wrote: > > I don't know how to interpret the output of strace so I just included it > > here as ls-output.bz2. I hope this helps us see the problem. > > There is a huge delay accessing > F:\cygwin\usr\local\etc\zoneinfo\posixrules, > on your F: drive. > What's that? To partially answer my own question, /usr/local/etc/zoneinfo comes from localtime.cc #define TZDIR "/usr/local/etc/zoneinfo" /* Time zone object file directory */ There is a lot about that on google, this is the first hit http://mail-index.netbsd.org/netbsd-bugs/1995/08/21/0006.html That doesn't explain the F: drive. Pierre -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: ls problem
On Tue, Nov 19, 2002 at 11:09:33PM -0500, Pierre A. Humblet wrote: >On Tue, Nov 19, 2002 at 10:56:49PM -0500, Pierre A. Humblet wrote: >> On Wed, Nov 20, 2002 at 11:48:10AM -0800, Carlo Florendo wrote: >> > I don't know how to interpret the output of strace so I just included it >> > here as ls-output.bz2. I hope this helps us see the problem. >> >> There is a huge delay accessing >> F:\cygwin\usr\local\etc\zoneinfo\posixrules, >> on your F: drive. >> What's that? > >To partially answer my own question, /usr/local/etc/zoneinfo comes from >localtime.cc >#define TZDIR "/usr/local/etc/zoneinfo" /* Time zone object file directory */ > >There is a lot about that on google, this is the first hit >http://mail-index.netbsd.org/netbsd-bugs/1995/08/21/0006.html > >That doesn't explain the F: drive. The delay is apparently ls doing things that haven't been straced. I don't know what could be causing the delay. It would be interesting to see what the task manager says is happening during this time. Does ls spike the CPU? cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: ls problem
Pierre, I think this probably explains the F: drive: ** Program name: F:\cygwin\bin\ls.exe (1728) App version: 1001.8, api: 0.34 DLL version: 1003.13, api: 0.62 DLL build:2002-10-13 23:15 OS version: Windows NT-5.0 Date/Time:2002-11-20 10:53:49 ** In other words, Carlo's Cygwin installation in on the F: drive. Randall Schulz Mountain View, CA USA At 20:09 2002-11-19, Pierre A. Humblet wrote: ... That doesn't explain the F: drive. Pierre -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: ls problem
He put it of F Drive. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Pierre A. Humblet Sent: Tuesday, November 19, 2002 10:10 PM To: [EMAIL PROTECTED] Subject: Re: ls problem On Tue, Nov 19, 2002 at 10:56:49PM -0500, Pierre A. Humblet wrote: > On Wed, Nov 20, 2002 at 11:48:10AM -0800, Carlo Florendo wrote: > > I don't know how to interpret the output of strace so I just included it > > here as ls-output.bz2. I hope this helps us see the problem. > > There is a huge delay accessing > F:\cygwin\usr\local\etc\zoneinfo\posixrules, > on your F: drive. > What's that? To partially answer my own question, /usr/local/etc/zoneinfo comes from localtime.cc #define TZDIR "/usr/local/etc/zoneinfo" /* Time zone object file directory */ There is a lot about that on google, this is the first hit http://mail-index.netbsd.org/netbsd-bugs/1995/08/21/0006.html That doesn't explain the F: drive. Pierre -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: ls problem
On Tue, Nov 19, 2002 at 11:18:59PM -0500, Christopher Faylor wrote: > The delay is apparently ls doing things that haven't been straced. I don't > know what could be causing the delay. It would be interesting to see what > the task manager says is happening during this time. Does ls spike the > CPU? Chris is right. On my WinME there is a 150 ~ 200 ms delay at the same spot. Sorry about the F: drive. Pierre -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: ls problem
I installed cygwin on my F drive. The file system type is NTFS. I run taskmanager and these are the statistics: Mem usage peaks at 1728K. The graph of the CPU Usage peaks at 72 percent. Is there something wrong with my F drive? Thanks! Carlo - Original Message - From: "Pierre A. Humblet" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 19, 2002 8:37 PM Subject: Re: ls problem > On Tue, Nov 19, 2002 at 11:18:59PM -0500, Christopher Faylor wrote: > > The delay is apparently ls doing things that haven't been straced. I don't > > know what could be causing the delay. It would be interesting to see what > > the task manager says is happening during this time. Does ls spike the > > CPU? > > Chris is right. > On my WinME there is a 150 ~ 200 ms delay at the same spot. > Sorry about the F: drive. > > Pierre > > > -- > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple > Bug reporting: http://cygwin.com/bugs.html > Documentation: http://cygwin.com/docs.html > FAQ: http://cygwin.com/faq/ > > -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: ls problem
> >> There is a huge delay accessing > >> F:\cygwin\usr\local\etc\zoneinfo\posixrules, > >> on your F: drive. > >> What's that? I have no idea. In fact, /usr/local/etc/zoneinfo does not exist--neither a directory nor a file. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: ls problem
Carlo, Do you have any anti-virus software running? 'ls -l' has to open each file, and this typically triggers your AV software to scan it. Depending on your AV product, and how you have configured it, this might explain unusual delays. If you do have AV software running, try repeating the tests with it disabled, and report back. Thanks, David -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: ls problem
David, The odd thing is that the delay occurred on a file (in a directory) that, according to Carlo, do not exist. Nor do they exist on my system even though I have all of the Cygwin packages installed (including XFree86/Cygwin). Why would a simple attempt to access a non-existent file trigger a nearly two-second delay in an anti-virus subsystem? Does Windows have some kind of "auto-mount" capability for accessing remote file systems? If it did and it were somehow triggered by the attempt to access that directory it could explain the delay? Could there be a Windows mount (not a Cygwin mount) active for that directory that refers to a network drive letter with an invalid server association? (Is that even possible?) Carlo, you could try one of these commands: mountvol 'F:\cygwin\usr\local\etc' /l mountvol 'F:\cygwin\usr\local\etc\zoneinfo' /l mountvol 'F:\cygwin\usr\local\etc\zoneinfo\posixrules' /l to see if Windows has a mountvol association with the directories involved in the problem. Randall Schulz Mountain View, CA USA At 05:08 2002-11-22, David Starks-Browning wrote: Carlo, Do you have any anti-virus software running? 'ls -l' has to open each file, and this typically triggers your AV software to scan it. Depending on your AV product, and how you have configured it, this might explain unusual delays. If you do have AV software running, try repeating the tests with it disabled, and report back. Thanks, David -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/