GNU bug report logs - #18681
The Linux cp command has bugs

Previous Next

Package: coreutils;

Reported by: "Polehn, Mike A" <mike.a.polehn <at> intel.com>

Date: Fri, 10 Oct 2014 17:30:02 UTC

Severity: normal

Done: Bob Proulx <bob <at> proulx.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Linda Walsh <bash <at> tlinx.org>
To: Bob Proulx <bob <at> proulx.com>
Cc: 18681 <at> debbugs.gnu.org, "Polehn, Mike A" <mike.a.polehn <at> intel.com>
Subject: bug#18681: cp Specific fail example
Date: Sat, 11 Oct 2014 02:24:31 -0700
Bob Proulx wrote:
> Meanwhile...  I would be one of those suggesting that perhaps you
> should try using rsync instead of cp.  The cp command is lean and mean
> by comparison to rsync (and should stay that way).  But rsync has many
> attractive features for doing large copies.
>   
---- fwiw...---
Like large execution times... from the latest snapshot on my system --
I use rsync to only move differences between  yesterday and "today[whenever
new snap is taken]"... it was a larger than normal snap -- most only
take 75-90 minutes...but rsync (these are the script messages) with some
debugging output still turned on... even an rm over the resulting diff
took 101 seconds... then cp comes along.. even w/a sync it would
still be under a minute.

I.e. rsync copied just the diffs to "/home.diff", then
find with "-empty -delete" is used to get rid of empty dirs (rsync
creates many of these).  then a static partition is created to hold
the "diff" output -- and cp took walked and copied the tree in 12s.
(output wasn't flushed, but it's not that long.. <a minute...).

If rsync wasn't so slow at local I/O...*sigh*....

rsync took 110m, 14s
Empty-directory removal took 1m, 41s
Find used space for /home.diff...sz=4.3GB, min=5.4GB, extsz=4.0MB, 
n-ext'=1388
target extents num=1388, size=4.0M
Old volume active:  Deactivated. Removed.
Create vol. Home-2014.10.08-03.07.05, size 5.4G
{L=>141008030705, /dev/Data/Home-2014.10.08-03.07.05=>CODE(0xbf24a0), 
f=>CODE(0xbf24e8), d=>{su=>"64k", sw=>1}, i=>{maxpct=>10, size=>256}, 
s=>{size=>4096}}
About to copy base-diff dir to static
Copying diffs to dated static snap...Time: 0m, 12s.
mklabel@ 
/home/.snapdir/@GMT-2014.10.08-03.07.05/./._snapdat_=snap_copy_complete
after copy2staticsnap: complete






This bug report was last modified 10 years and 212 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.