X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E27013858C2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1673753118; bh=Wy0jAL7P3V4Nj16WlqhAz+bh5jmG9pkyx9VriA3izcY=; h=Date:To:Cc:Subject:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=Vld9ZCzv/OaFyzpfeyUtKctJG+3qsiVRmUV66UAdYFAK6bhn8nGsLwFACykjE7kcu 1aJnNMWdVQtQ81bbqALPHdo66sMS2Hx9SvlIfzmdrMbBfVzE5d1uRIrHxLpySGe3bI V4Wnre9RTY7pDVvmj5FbiFCTBuBjoGaUIlb8YqsY= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0B3D73858D1E X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-Spam-Language: en X-Spam-Relay-Country: X-Spam-DCC: B=MGTINTERNET; R=smtp1.atof.net 1170; Body=1 Fuz1=1 Fuz2=1 X-Spam-RBL: X-Spam-PYZOR: Reported 0 times. Date: Sat, 14 Jan 2023 22:24:55 -0500 To: moss AT cs DOT umass DOT edu Cc: cygwin Subject: Re: Question about slow access to file information Message-ID: References: <797a8935-e38b-0c0f-87d8-b8df1e9fd76f AT cs DOT umass DOT edu> <0c9c111e-9e63-bf8c-8049-06fd23f66351 AT t-online DOT de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: "gs-cygwin.com--- via Cygwin" Reply-To: gs-cygwin DOT com AT gluelogic DOT com Content-Type: text/plain; charset="iso-8859-1" Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id 30F3Pl5X013870 On Sun, Jan 15, 2023 at 12:05:10PM +1100, Eliot Moss via Cygwin wrote: > On 1/15/2023 3:38 AM, Christian Franke via Cygwin wrote: > > Eliot Moss via Cygwin wrote: > > > I have a separate drive mounted this way: > > > > > > d:/ /cygdrive/d ntfs binary,posix=0,user,noacl,auto 0 0 > > > > > > One thing I use it for is to store backup files.  These tend to be 2 Gb > > > chunks, and there can be hundreds of them in the backup directory. (The drive > > > is 5Tb.)  The Windows Disk Management tool describes it as NTFS, Basic Data > > > Partition. > > > > > > Doing ls (for example) takes a very perceptible numbers of seconds (though > > > whatever takes a long time seems to be cached, at least for a while, since a > > > second ls soon after is fast). > > > > The problem is the 'noacl' mount option and the fact that POSIX only > > offers the *stat*() functions to retrieve file information. These > > functions always need to provide the full file information, even if only > > a small subset is needed. > > > > To determine the 'x'-permission bits in the 'stat.st_mode' field on a > > 'noacl'-mount, Cygwin reads the first bytes of most files (all except > > *.exe, *.lnk, *.com). The 'x' bits are set if the file starts with "#!" > > (script), ":\n" (?) or "MZ" (Windows executable). > > > > On 'noacl' mounts, this behavior could be suppressed by 'exec' or 'noexec' mount options. > > Interesting. I removed the noacl from /etc/fstab and restarted all Cygwin processes. > The mount program now shows that drive without noacl. It still takes surprisingly > long to ls if I have not done so recently. The directory contains ~1200 files. > > Further thoughts? Does this make any difference? $ env - LANG=C ls -f /cygdrive/d/ Also, ISTR prior mailing list postings on how cygwin may open() each file to determine some info, and that can be expensive. Is that what is happening if you trace the 'ls'? Cheers, Glenn -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple