From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailsrv.cs.umass.edu (mailsrv.cs.umass.edu [128.119.240.136]) by sourceware.org (Postfix) with ESMTPS id B6ED43858D1E for ; Sun, 15 Jan 2023 01:05:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B6ED43858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=cs.umass.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=cs.umass.edu Received: from [10.28.105.198] (unknown [150.203.68.123]) by mailsrv.cs.umass.edu (Postfix) with ESMTPSA id 5F703401DC8D; Sat, 14 Jan 2023 20:05:14 -0500 (EST) Message-ID: Date: Sun, 15 Jan 2023 12:05:10 +1100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Reply-To: moss@cs.umass.edu Subject: Re: Question about slow access to file information Content-Language: en-US To: cygwin References: <797a8935-e38b-0c0f-87d8-b8df1e9fd76f@cs.umass.edu> <0c9c111e-9e63-bf8c-8049-06fd23f66351@t-online.de> From: Eliot Moss In-Reply-To: <0c9c111e-9e63-bf8c-8049-06fd23f66351@t-online.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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? EM