From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by sourceware.org (Postfix) with ESMTPS id C918D3858424 for ; Mon, 18 Dec 2023 06:49:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C918D3858424 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C918D3858424 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::133 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702882187; cv=none; b=cmRSYX17O3v41OAFuAxyztQEnxCcVbuA2RcNChbDqX+1eRgU23z+ofcQ7BLeFb944G/c6F7j5cTgrL2zTIMp9MyrIhBrdhfYimtmjSj9wTwUfmBqRlQ0Q/VN33l97MSJJd9s6c7fQXNTJEUsytuueS8HwfUzJOQzMtzLwr+rUg4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702882187; c=relaxed/simple; bh=pQjmMM8KHpEMWJ/v42iVtO2SnurtRdyZjCzq0y1dUzI=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=ZY9mZuiVQR2VSd5JmEFv5X0Ap0GbLJ5QdtGuppFsa3PEYAMONuWORqrto8ksUCr8//SMTDrIW9RBP1084EEi/y+2NFH+z7Ib1+ZoEm/wbpfPs+T6+aS7alNtHfGZSuGgok0O3S9C53A6a+ujLejUC20SXkmo4FPtssKL0BZV6Jk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-50bdec453c8so2858071e87.3 for ; Sun, 17 Dec 2023 22:49:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702882183; x=1703486983; darn=cygwin.com; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=6YE+q7NDmszJwYzdUH/t+VhcBrZaTb3TCLF7+JHz4YI=; b=MyYIrVmzQZ7MH6Maxc0dGvcT6dsjerpRIGj7xRsTvdE7LDggPv/Mx2hU+J94ewkmJ+ 3Inha7mZb4RW4LF1ETheIT6Cuz7nL1HFRGgYvsLU6KEb3jRTx7LkCI5I+Dl5CBk/TLkY HBUYAdl0Q7WixGO81rgdtXfyYkkoaDVxYQhHgz9P79JmefYJAC+dop6sZhh/9mA+sCkS I1vgwztZP40GIXqkuEZYxLBpHSHVhtuWS3gItDvPpyI2cy2BX31LcVoF+CXqDtv4ISsB 9xPWO8IT+DrnIMvo8ZKsavFHv6fUTraQoXJHcwR8NP8EIkfnea6tZuSI5t1wfAcP0fWI kdIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702882183; x=1703486983; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6YE+q7NDmszJwYzdUH/t+VhcBrZaTb3TCLF7+JHz4YI=; b=l7G1CTZzXk6uCXn2IcnSBj4St06p/C/wGkxHsDSFqgFMFtYJqRdbAOZhHqT4Nbdhpb f3cu7/aEI7CulL33LOz38dQXepXSbRphCysOu0WFq0E1ixBFETnBlLJGeVKGnozk1lVU fdDAbXUM5i35ZaIQ+dGSpa5Q2FUi8tfTLCmU+ElPD/SeRbg27ltG4c+C8fHalZaGdZdr oNqHbOyEQYkl4R7wRZplDIecB0JtI9SwIHJpf5ct/2TGl7+UpoNUOnMf8K6dUu7WrHn6 XYwa/lvkN3cIGZ0dJ7M/lkNb7ifsarnHwxuNKhEtJuMvPkvNPigdgsIVDowpSUUU2+lr 4BJw== X-Gm-Message-State: AOJu0Yybhbhn0P4iHaU3ivCQgRk/lcwPZ4E+fWB9Rf/jb4cR0PIa7tCf FBEKtmSVCJVzQr+H7fZYk1Y85KrI/+Y= X-Google-Smtp-Source: AGHT+IGX+IP9AB8R72hbSeg7yQxn4yoxFHhe2nw2XxWS7kctfqtjmkRgTj6qkjfW2x4AAqp9RvLDdA== X-Received: by 2002:ac2:5969:0:b0:50e:3827:20c8 with SMTP id h9-20020ac25969000000b0050e382720c8mr556090lfp.55.1702882182943; Sun, 17 Dec 2023 22:49:42 -0800 (PST) Received: from ?IPV6:2001:a61:128d:7901:4d45:cdea:8b4a:9fa7? ([2001:a61:128d:7901:4d45:cdea:8b4a:9fa7]) by smtp.gmail.com with ESMTPSA id f2-20020a056402004200b0055346cb9707sm874008edu.45.2023.12.17.22.49.42 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 17 Dec 2023 22:49:42 -0800 (PST) Message-ID: <2dca96f8-77ab-4e14-a9a1-4a6f543ca16e@gmail.com> Date: Mon, 18 Dec 2023 07:49:42 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Catastrophic Cygwin find . -ls, grep performance on samba share compared to WSL&Linux Content-Language: en-US To: cygwin@cygwin.com References: From: Marco Atzeri In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham 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 18/12/2023 07:22, Dan Shelton via Cygwin wrote: > On Wed, 6 Dec 2023 at 05:08, Dan Shelton wrote: >> >> Hello! >> I am unhappy to report a severe performance issue with find -ls, ls -R >> and grep -r, with Cygwin 3.4.9 and Cygwin 3.5.0 when samba shares are >> involved. >> >> Imagine a directory with 256 subdirs, and each has 256 files per >> subdir, all on a samba share, samba server is on Linux with tmpfs. >> >> mkdir dir1 >> for ((i=0;i<256;i++)) ; do >> mkdir "dir1/subdir$i" >> for ((j=0; j < 256;j++));do >> echo "j=$j" >"dir1/subdir$i/j$j.txt" >> done >> done >> >> Time comparisations then show a dramatic difference, Debian Linux >> accessing the samba share, WSL accessing the samba share, and Cygwin >> accessing the samba share: .. >> Why does that happen? > > It would be nice if someone from the Cygwin authors could assist me in > figuring out why this happens. > > My working theory is that the extra file and dir lookup calls are for > soft- and hardlink emulation for file systems which do not have soft- > or hardlinks? > If this is correct, then a fix might be to 1) determinate the > filesystem type (cached, per process lifetime in absence of > /etc/mnttab) and its boundaries (mount point, and whether other muont > points are below it) 2) Only use the emulation for FAT filesystems, > and for NTFS, REFS, SMBFS the native filesystem link is used. > > Help! > > Dan Is your cygserver running ?