X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.7 required=5.0	tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY
X-Spam-Check-By: sourceware.org
Message-ID: <4F2C472C.1080403@t-online.de>
Date: Fri, 03 Feb 2012 21:44:28 +0100
From: Christian Franke <Christian.Franke@t-online.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110928 Firefox/7.0.1 SeaMonkey/2.4.1
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Slow stat() on noacl mounts due to x permission check
References: <4F2C2589.2000907@t-online.de> <20120203191349.GH30293@calimero.vinschen.de>
In-Reply-To: <20120203191349.GH30293@calimero.vinschen.de>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
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

Corinna Vinschen wrote:
> On Feb  3 19:20, Christian Franke wrote:
>> Cygwin stat() may be much slower on noacl mounts than on acl
>> mounts.This is because on noacl mounts the x-permission bit is
>> guessed by checking for "#!", ":" or "MZ" in the first bytes of the
>> file. AFAIKS this is done for all files except *.exe, *.lnk and
>> *.com.
>>
>> A real world testcase with 20120201 snapshot on a (C++/Java
>> development) tree with ~52000 files in ~12000 dirs:
>>
>> .                            noacl  acl
>> find -size ... (after boot)   518s  51s
>> find -size ... (disk cached)   13s   8s
>> find -name ... (disk cached)    3s   3s (does not need stat())
>>
>> Is it really needed to do the header check for each file?
>>
>> Would it break important use cases if the check is only done for
>> files with typical script file extensions?
>> For example: no extension, .sh, .csh, .pl, .py, ...
>>
>> Another more flexible solution would be a mount option to configure this.
>> (xguess=0: no check; 1: some extensions only; 2: all files)
> We already have the exec/notexec/cygexec mount options, see
> http://cygwin.com/cygwin-ug-net/using.html#mount-table
>
>

Somehow I misunderstood the notexec option. Sorry for the noise.

Christian


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

