DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 5BM5FxNr002410 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 5BM5FxNr002410 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=CChadj21 X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8315A4BA2E37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1766380558; bh=fY7FeEQdFrrKuQaeGHakVvnQGYtxFZIyilsHjC9kyw4=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=CChadj21fvJnEOmV5pPZKBIw+f5hHJrYXVSmTydFN1jdMTtlWAaA91f36VbaVewbw A1j4Mn1xdeiv6VdTGFk2J44iNO1SgPdBtH/yB87ysOlOkf53WtaFEV4nzhyglsOflz AgHDBDz52WiBkkGg0a4wbmlIFuMYVeYAQhG6ijyA= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2B2824BA2E04 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2B2824BA2E04 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1766380507; cv=none; b=D+8u772/ONWpSZKrj3nnSkgLk6g//7T+/nZWPrOHbbbT3EdEw5pcg/O5X+dkhgx4QsWeierja+iQ48n3pDDtpFnppxAb3CV0C3gZYrZpCBT0Q/MaFH3HTrk9p0WEG6509mCHt1rsD+vHA9rQe9hQnV2c3II4UwlXy3qXNKQ8ArM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1766380507; c=relaxed/simple; bh=96FgDtGHX/tKGBAzwsxwrPqDjWPmGHHj6C3CrlfT2Dw=; h=DKIM-Signature:Message-ID:Date:MIME-Version:From:Subject:To; b=Ot3kqWr0lfflonI1+Pk4jbQ7ah1z6MdTBxJxQvh//lzXneh2r5nskjY01q5dtRoVO0Mcx3bqLCAtzzoGvE/p7WPGuTsd+VTRAfwp9xnk/AzdcZVPlyPxHh8tK3mSRV7wS9S0hworykr9k8ysGuTorETKK9p7/KW1ht4hk5Sfemc= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2B2824BA2E04 X-Barracuda-Envelope-From: moss AT cs DOT umass DOT edu X-Barracuda-RBL-Trusted-Forwarder: 128.119.240.136 DKIM-Filter: OpenDKIM Filter v2.11.0 mailsrv.cs.umass.edu E96BF5BDA0 X-Barracuda-RBL-Trusted-Forwarder: 172.26.69.67 Message-ID: <74bdc787-9099-8e29-492a-588546b6eedb@cs.umass.edu> Date: Mon, 22 Dec 2025 00:15:04 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Why is stat slow? To: cygwin X-ASG-Orig-Subj: Why is stat slow? Content-Language: en-US X-Barracuda-Connect: mailsrv.cs.umass.edu[128.119.240.136] X-Barracuda-Start-Time: 1766380506 X-Barracuda-Encrypted: TLS_AES_256_GCM_SHA384 X-Barracuda-URL: https://barramail.cs.umass.edu:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cs.umass.edu X-Barracuda-Scan-Msg-Size: 1874 X-Barracuda-BRTS-Status: 1 X-ASG-Debug-ID: 1766380506-24039d6c3d4d7000001-w5GHUG X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=10.0 KILL_LEVEL=9.7 test= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.125474 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 List-Id: General Cygwin discussions and problem reports List-Archive: List-Post: List-Help: List-Subscribe: , From: Eliot Moss via Cygwin Reply-To: Eliot Moss Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "Cygwin" Dear Cygwin-ers -- I'm sure this has been asked before, more than once, but I am again wondering what, specifically, makes stat (the program, but presumably also the syscall) substantially slower on Cygwin compared to stat on WSL2. I am talking about an external HDD (not solid state) on my D: drive. It shows under WSL 2 as /mnt/d like this (output of mount): D:\ on /mnt/d type 9p (rw,noatime,aname=drvfs;path=D:\;uid=0;gid=0;symlinkroot=/mnt/,cache=5,access=client,msize=65536,trans=fd,rfd=5,wfd=5) On Cygwin it shows up like this (yes, mount shows two lines): D: on /cygdrive/d type ntfs (binary,notexec,posix=0,user) D: on /cygdrive/d type ntfs (binary,noacl,posix=0,user,noumount,auto) My /etc/fstab lines are: none /cygdrive cygdrive binary,noacl,posix=0,user 0 0 d: /cygdrive/d ntfs binary,posix=0,user,auto,notexec 0 0 (Presumably this has something to do with two mounts showing ...) On D; I have a folder with hundreds of 2Gb files (they are backups, split into 2Gb portions). On Cygwin time stat gives real 2m12.425s user 0m0.249s sys 0m1.312s A second run shortly after the first completes very quickly, indicating the presence of a cache :-) . time stat on WSL2 gives: real 0m2.208s user 0m0.026s sys 0m0.149s This is after a reboot, so there is no caching available. So, why is Cygwin 60 times slower, even when WSL2 has the handicap of having to work through the 9p adapter / COM surrogate? Mostly I am curious, but this is also relevant because I rsync this file collection to offsite storage, and the stat time is about what it takes for rsync to start up - it needs to check file times and lengths. This makes me wonder if there is something we can do to make this better, by figuring out what WSL2 / 9p are doing ... Best - Eliot Moss -- 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