From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11380 invoked by alias); 25 Jan 2016 20:08:45 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 11351 invoked by uid 89); 25 Jan 2016 20:08:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-92.8 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,KHOP_DYNAMIC,RCVD_IN_BRBL_LASTEXT,RCVD_IN_PBL,RDNS_DYNAMIC,USER_IN_WHITELIST autolearn=no version=3.3.2 spammy=1.4, prudent, 9.7, opens X-HELO: calimero.vinschen.de Received: from ipbcc05c50.dynamic.kabel-deutschland.de (HELO calimero.vinschen.de) (188.192.92.80) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 25 Jan 2016 20:08:43 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 70C02A80389; Mon, 25 Jan 2016 21:08:41 +0100 (CET) Date: Mon, 25 Jan 2016 21:03:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Performance of "ls -F" Message-ID: <20160125200841.GB26077@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <3a9ff6ec2d5e4e64a96a8f8e31d12f22@ntmaexbe04.bedford.progress.com> <20160122201418.GC3268@calimero.vinschen.de> <8737tpqqb6.fsf@Rainer.invalid> <20160123173552.GE3268@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="zYM0uCDKw75PZbzx" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-SW-Source: 2016-01/txt/msg00354.txt.bz2 --zYM0uCDKw75PZbzx Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2720 On Jan 25 11:02, Achim Gratz wrote: > Corinna Vinschen cygwin.com> writes: > > In the noacl case, Cygwin tries to find out if files are scripts. It > > opens the file and checks the first two bytes in the file for a shebang > > (and other stuff). >=20 > acl > time ls --file-type > /dev/null > 0.015u 0.015s 0:00.42 4.7% 0+0k 0+0io 2473pf+0w > acl > time ls -F > /dev/null > 0.078u 0.858s 1:10.69 1.3% 0+0k 0+0io 5243pf+0w >=20 > noacl > time ls --file-type > /dev/null > 0.015u 0.015s 0:00.37 5.4% 0+0k 0+0io 2391pf+0w > noacl > time ls -F > /dev/null > 0.093u 1.327s 1:38.90 1.4% 0+0k 0+0io 6309pf+0w >=20 > > This may take a lot of time, more so on network > > drives. Can you try adding the "notexec" mount option to the "noacl" > > share and see if that helps? >=20 > acl,notexec > time ls --file-type > /dev/null > 0.015u 0.030s 0:00.41 9.7% 0+0k 0+0io 2471pf+0w > acl,noexec > time ls -F > /dev/null > 0.062u 0.811s 1:10.31 1.2% 0+0k 0+0io 5240pf+0w >=20 > noacl,notexec > time ls --file-type > /dev/null > 0.031u 0.030s 0:00.41 14.6% 0+0k 0+0io 2389pf+0w > noacl,notexec > time ls -F > /dev/null > 0.046u 0.718s 0:56.23 1.3% 0+0k 0+0io 4994pf+0w >=20 > > This test is done for a looong time to accommodate FAT filesystems in > > the first place. It might be prudent to disable it by default these > > days... >=20 > Looks like that's not the main reason for the extra time spent. Off the top of my head, the common denominator seems to be that on directories returning d_type information, --file-type doesn't have to call stat(). That makes it very fast since only a directory enumeration is done. Calling stat on the other hand is time consuming since on Windows it requires to open the file and read meta information (including the ACL) or data (noacl exe recognition) from it. > Here's another NetApp share, but this time there are about half as many > files with only two of them in each sub-directory. >=20 > (1046)/mnt/upload/install > time ls --file-type x86*/patches/*/* > /dev/n= ull > 0.155u 1.358s 0:09.42 15.9% 0+0k 0+0io 10555pf+0w > (1047)/mnt/upload/install > time ls -F x86*/patches/*/* > /dev/null > 0.109u 1.046s 0:08.20 13.9% 0+0k 0+0io 9817pf+0w >=20 > Somehow that takes a lot less time and there's no difference between the = two > invocations (or actually a bit less time for -F). The getVolInfo helper > sees these two shares with the same settings. Not sure what to make of t= hat... Hmm, no, sorry, I have no idea. Somebody will have to debug this. Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --zYM0uCDKw75PZbzx Content-Type: application/pgp-signature; name="signature.asc" Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWpoDJAAoJEPU2Bp2uRE+gwhcQAIRfNRKHsYaQDhAA9XQOBM1D h/BEgiK5PgiWc5CCht6l2ys1+mSCN4bF9zPXh7O2JQjTOc6gX51yLZT2cMh1jznc wyqd3hoeF0ZQAhfy+nfiewrkbCKFIaXYNAtXadIkV94mXWg06LDQSb3EvaJuILUq niP34EVydmF9SW++WbgVqjTnurJvBnIj9RPsbOsUjkzpwpZzAgwu2NT7VJT12mz/ QtLk7Mh+DK7onMf8UOo8+bBzEwtCvBSnIEIlah5KOKMVAogAIhCEhwO7yupKUoD3 8TBdhzrglw1Kv+C+fWh2sJpc95bRFC2XhVTBPKZ+9Gha0PAtr9Yw8I5CG/5F1aM4 BjEZyNt35JAB+hGlH2P7v1aRjocZRMfIBrpZvF9cyrn45WWoDZBu9mjhmkH7f5TG HCVdykcRz4nYXHuWVcMZ/Je37vvOwSHFzWltEuu7zBFuQ+rALkkjxYXXUmi8Xr58 ItuoMaigc+jIlMb7mvJ8PNGNXGkUkT4gZnGYTu1M/5tDTQmtoE0GHFG45n0KEAh7 GprTXfj5RUaUkttxjf8+lwTOkPsHQGUktZ8080pMLPon5433+k9VooiVRbkutVO6 hIGJklmOrFwFR5mumBLE7S13MpMOvObmx3CikiB/Wg/WW9X+af8frkElGboyiciU oB+sZPBCNbh8+P2t2MA8 =XYUq -----END PGP SIGNATURE----- --zYM0uCDKw75PZbzx--