delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/01/31/16:36:55

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B33953858D39
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=dinwoodie.org
Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dinwoodie.org
Date: Mon, 31 Jan 2022 21:36:15 +0000
From: Adam Dinwoodie <adam AT dinwoodie DOT org>
To: cygwin AT cygwin DOT com
Subject: Re: Renaming (with 'mv') very large files is SLOW
Message-ID: <20220131213615.l3bvoyacl3jcvls2@lucy.dinwoodie.org>
References: <25079 DOT 63376 DOT 349893 DOT 86395 AT consult DOT pretender>
<c1e4529a-d119-1662-6eeb-2d42950802c7 AT cs DOT umass DOT edu>
<25079 DOT 64935 DOT 73349 DOT 331715 AT consult DOT pretender>
MIME-Version: 1.0
In-Reply-To: <25079.64935.73349.331715@consult.pretender>
X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
PDS_RDNS_DYNAMIC_FP, RDNS_DYNAMIC, SPF_HELO_PASS, SPF_PASS, TXREP,
T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <https://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com>

On Mon, Jan 31, 2022 at 10:17:59AM -0500, cygwin AT kosowsky DOT org wrote:
> Eliot Moss wrote at about 09:59:17 -0500 on Monday, January 31, 2022:
>  > On 1/31/2022 9:52 AM, cygwin AT kosowsky DOT org wrote:
>  >  > I tried renaming some very large files (20-40 GB) using:
>  >  >     mv <oldname> <newname>
>  >  > without changing the directory of course.
>  >  >
>  >  > The process took about 10-20 minutes with Task Manager showing disk
>  >  > activity of 100+ MB/s.
>  >  >
>  >  > Is there something about such large 'renaming' that actually results
>  >  > in the file being really moved (aka copied) rather than just renamed?
>  > 
>  > The two places are probably on different volumes (loosely, different disks).
>  > That requires a physical move, even under Linux.
> 
> No my point is I am just *renaming*, not physically moving the file!!
> i.e., I am not changing the directory location of the file, let alone
> the volume/disk location.
> (I am well aware that 'mv' does a copy when changing volumes/disks).
> 
> I literally am typing something like:
>   mv foo bar
> 
> In Linux, that just edits the file system table & inode...
> 
> UPDATE...
> I just tried a second 'mv' and it was near instantaneous.
> (and similarly with subsequent renaming of the same file)
> So perhaps not a 'Cygwin' thing but something going on within Windows.
> 
> Could it be that the first 'mv' triggered an anti-virus read of the file since
> perhaps it detects it as a new/changed file?
> 
> But if so, would 'mv' (under Task Manager) be showing the 100+ MB/s disk activity?

That definitely seems plausible; there's a reason a significant number
of the applications that are known to interfere with Cygwin operation
(see [0]) are antivirus applications.  But what would trigger your
antivirus to want to scan a file, and how much work is required to do
that, is something you'll need to take up with your antivirus vendor,
I'm afraid.

[0]: https://cygwin.com/faq/faq.html#faq.using.bloda

-- 
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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019