delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2022/01/31/10:15:02

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 3A608385783F
Authentication-Results: sourceware.org;
dmarc=fail (p=none dis=none) header.from=gmail.com
Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=m.gmane-mx.org
X-Injected-Via-Gmane: http://gmane.org/
To: cygwin AT cygwin DOT com
From: =?UTF-8?Q?Ren=c3=a9_Berber?= <rene DOT berber AT gmail DOT com>
Subject: Re: Renaming (with 'mv') very large files is SLOW
Date: Mon, 31 Jan 2022 09:13:59 -0600
Message-ID: <d3c5507d-4425-94d6-c985-30c7093d626b@gmail.com>
References: <25079 DOT 63376 DOT 349893 DOT 86395 AT consult DOT pretender>
<c1e4529a-d119-1662-6eeb-2d42950802c7 AT cs DOT umass DOT edu>
Mime-Version: 1.0
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19)
Gecko/20081209 Lightning/0.9 Thunderbird/2.0.0.19 Mnenhy/0.7.6.0
In-Reply-To: <c1e4529a-d119-1662-6eeb-2d42950802c7@cs.umass.edu>
X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,
FORGED_GMAIL_RCVD, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,
HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A,
NML_ADSP_CUSTOM_MED, SPF_HELO_NONE, 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 1/31/2022 8:59 AM, Eliot Moss wrote:

> 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.  Your
> volumes seem a bit slow to access - is one perhaps across a slow
> network?  The rates you cite suggest movement of 50Mb/s (50Mb read +
> 50Mb write = 100Mb overall).  For 40 Gb that should take 40Gb / 50Mb
> = about 820 secs = a little under 14 mins.
> 
> (When I say your volumes are slow, I speak from the luxury of having
> a 2Tb solid state drive!  Actually, those speeds may be reasonable
> depending on the nature of your system.)
> 
> If the two locations are on different drives, there's no real
> avoiding this.

Nope, I've also complained about this (long ago), if the two locations
are the same remote drive... Cygwin moves the entire file over the network.

I ended up writing my own Samba mv command.
-- 
R. Berber


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