delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/02/03/14:14:36

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Fri, 3 Feb 2012 20:13:49 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Slow stat() on noacl mounts due to x permission check
Message-ID: <20120203191349.GH30293@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4F2C2589 DOT 2000907 AT t-online DOT de>
MIME-Version: 1.0
In-Reply-To: <4F2C2589.2000907@t-online.de>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019