From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by sourceware.org (Postfix) with ESMTPS id 3750A3858000 for ; Mon, 18 Dec 2023 06:53:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3750A3858000 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 3750A3858000 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::130 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702882422; cv=none; b=N020ewRo1Q0vGpUbopqc7E3HzQ8nGodu5b9BINpZhu94f7BJlNNEJ3sMbfp/2XvyVl6xzdXuxxhW3I5ry2WK7hEvlaQe6XfyKc5+CMwzyWpp1qWLUHrrW9MOXgvgyPAWkztjExyhho1V5IVKWZ8tbX6foCQamTb/OnDwy1htqxE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702882422; c=relaxed/simple; bh=EefRpfoCffi+vZoNVcguGs1FYmZ4ZoQIw/flDK8Mc0o=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=kxIbq2Y/gnFW1JI2i0XrB1dLb1LjeZ1jIK3Ud66xBpkPp7217OmA2P+ULHSaZaMY4401k4d4MPQFK0y1FXknOg1y6ZRw7uCkynS70d36p+ZxxOhtug95Y63JNcVmcR/GA74KNcR1bfcO+qZljFX8Ud3mcSvajtLxUD6D9LUimjg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-50e270639d9so1846308e87.3 for ; Sun, 17 Dec 2023 22:53:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702882418; x=1703487218; darn=cygwin.com; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=Tt9Yu12sVdNkiVO7VMXxUVejvFVZwR0P/k93PlHQtw8=; b=c49OzGJHqmytUkKvW8DNb26twpCTCRe5kMyeFtU7EWR6PFyxwrxyUhDsf6Y8Pa2cb1 tljD3MB6vP8XJ1JxlnKJrT+g/PuM5bN56iHNhpttBJcyEm99K7MNqdy5EebxeQA1x1Jc QQsG0rsU7E6WVZme3HFRN1L0I71tOboJ7A5UnmpllWZFHoNoWQlXYeUU5zhPHhkFcfAc 3QRUYoVDUinrQ3euouSWmSzvY/TCvXyY7wX5Jn02H7WDbalGHe111lrwo9UKjuZZaWjp JIAGP934D/Ptqr4+bUQmAUmuIcvtqbKQopqHqu2DmD0NMhRIaOcQ/7TQmzKGPcWiE39c 4w8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702882418; x=1703487218; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Tt9Yu12sVdNkiVO7VMXxUVejvFVZwR0P/k93PlHQtw8=; b=pzpMGhVhm2BDTq8jKjZmzQvgdj67rDHkYz42rtI60uuGo0HxR3eRWuXA1XUH2f8WMW SkK5V9khTSOwRPymAjNh24MkAqGxv7Bd4K+Tqv8QpvkPFTXWLxf8nbF0EuMdN7Z83xd+ usit3u/8xcuaR+MLoaqd7ZkCFIQTSAacVp9nBDGZ07rE0CMp2G5Rq6CKgZvMRDUcBl2G DTDl65jdVKXL99VXVTSc77mIKNOO6zNSIFLxG1ZpaUdPhVjg4Qs6ISpZI7SXvIgcENqi 6o6I9Y8DubOdt7z+gAndMP+aeDTdLRojme4OhBbS1Wj24OXFwKb9eepN5eim5eey588a m/ZA== X-Gm-Message-State: AOJu0YyfIgbmpHe6D6YW3/HLMJeOia7L2aVn856ZU87gXGQJvsINSXZs qXpqs+LRwBptPTfqiEWR5albf5l/Kox8fAvwaN2W0pKH X-Google-Smtp-Source: AGHT+IHarqKd/d6CwfJ6ZpGBUgW9WJpCS4j8aLEs0GzTtI7hvq58Go0jnCagtlFwCWsWqKRO/DJ4TM9hNMmTm8UKCTo= X-Received: by 2002:ac2:5041:0:b0:50e:2800:d881 with SMTP id a1-20020ac25041000000b0050e2800d881mr1354784lfm.86.1702882418003; Sun, 17 Dec 2023 22:53:38 -0800 (PST) MIME-Version: 1.0 References: <2dca96f8-77ab-4e14-a9a1-4a6f543ca16e@gmail.com> In-Reply-To: <2dca96f8-77ab-4e14-a9a1-4a6f543ca16e@gmail.com> From: Dan Shelton Date: Mon, 18 Dec 2023 07:53:11 +0100 Message-ID: Subject: Re: Catastrophic Cygwin find . -ls, grep performance on samba share compared to WSL&Linux To: cygwin@cygwin.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=0.1 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 Mon, 18 Dec 2023 at 07:49, Marco Atzeri via Cygwin wrote: > > 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 ? Yes, Cygserver is running Dan -- Dan Shelton - Cluster Specialist Win/Lin/Bsd