X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:to:from:subject:date:message-id:references
	:mime-version:content-type:content-transfer-encoding; q=dns; s=
	default; b=HUGzePr3S56ydUK+OuAyZgDZGH5Oz76LHX62aRb1ntUNywvlbeO9N
	I6GUjsQYg9/NYxApJ79x4U/sMtbt8EFdm1nSXNuPnfC0BEHMngg6Iq8MHCMSFLzs
	gQ/PMsZEMEs2ek8VWp23X/kzo5BjGh02TZpf8w7iUAHFf6sgP0Ml6c=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:to:from:subject:date:message-id:references
	:mime-version:content-type:content-transfer-encoding; s=default;
	 bh=UfXRecpv5dBOVR/JSymuQdBBtns=; b=RyzI3zS7aZulShRv9awri6FiiI12
	xVM4XwCeXzGmDb3NLYk4IbzPCjstHkZwz/UBGrhlV1+tMBJ18Xr/qAt4oR9BLI1V
	LI8EhUyhm3cCcaGIuudY3EUeDVlYzqYwRNJ0fYmEqdyp/syHvX3M5R6jAZW63qbz
	qwOHq5DC7YwK1Fs=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=2.1 required=5.0 tests=AWL,BAYES_50,FSL_HELO_BARE_IP_2,RCVD_IN_DNSWL_LOW,RCVD_NUMERIC_HELO,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.2 spammy=1.4, prudent, 9.7, opens
X-HELO: plane.gmane.org
To: cygwin@cygwin.com
From: Achim Gratz <Stromeko@NexGo.DE>
Subject: Re: Performance of "ls -F"
Date: Mon, 25 Jan 2016 11:02:42 +0000 (UTC)
Lines: 51
Message-ID: <loom.20160125T111636-839@post.gmane.org>
References: <loom.20160121T163405-489@post.gmane.org> <CAH5rLZVWiGz2n-3Ru-C0_5KU-Cc4NipJPn1NQVphN2UetUK4iA@mail.gmail.com> <3a9ff6ec2d5e4e64a96a8f8e31d12f22@ntmaexbe04.bedford.progress.com> <loom.20160122T082744-501@post.gmane.org> <20160122201418.GC3268@calimero.vinschen.de> <8737tpqqb6.fsf@Rainer.invalid> <20160123173552.GE3268@calimero.vinschen.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes

Corinna Vinschen <corinna-cygwin <at> 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).

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

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

>  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?

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

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

> 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...

Looks like that's not the main reason for the extra time spent.


Here's another NetApp share, but this time there are about half as many
files with only two of them in each sub-directory.

(1046)/mnt/upload/install > time ls --file-type x86*/patches/*/* > /dev/null
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

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 that...


Regards,
Achim.


--
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

