file copy progress bar shows read progress. write progress would be more useful?
When copying from a fast disk, to a slower one, on a system with a massive amount of ram (and therefore disk buffer).
The file copy progress shows speed, and time estimates based on the speed of the device being read.
For example, when coping a large file (2Gig) from a network drive (~11MB/s) to a slow USB stick (7MB/s)on a system with 32gigs of ram, the file copy progress shows about 11MB/s, and estimates about 3 minutes.
The progress bar then hits 100%.. But any attempt to unmouut the USB stick fails for the next few minutes, until the write buffers are flushed.
This is much much worse, when the file to be copied is already in the local disk buffer.
For example...
Simulate creating a file - it will be buffered..
dd if=/dev/zero of=zeroes.bin bs=1G count=2
Now copy this to a slow USB stick. the porgress bar instantly jumps to 100%, there is no time prediction. unmount will fail for the next 7 minutes or so.
repeating these tests with rsync --info=progress
gives correct time estimates.
time rsync --info=progress2 /run/user/60408/gvfs/sftp:host=MY_FILE_SERVER/data/BIGFILE.zip /run/media/MY_USERNAME/USB && time sync
2,599,370,775 100% 6.30MB/s 0:06:33 (xfr#1, to-chk=0/1)
rsync --info=progress2 /run/media/MY_USERNAME/MK 1.77s user 7.02s system 2% cpu 6:34.02 total
sync 0.00s user 0.02s system 27% cpu 0.071 total
Note how the time spent waiting for sync
was zero.
Could the copy behavior be made to work in the same was as rsync
?