35

Is there a way to show the speed of copying files on a Mac? For example, when copying a file from the hard drive to SDHC card and vice versa.

The reason is that I can check out the max speed of an SDHC card on my Dell PC, but it seems that on there, the card interface is limited to 20MB/s read or write. So I want to check how it is on the iMac 27 inch. Maybe some test program can be used, but I still like to find out any simple way to tell the speed of copying files on the Mac.

2 Answers 2

48

If you're comfortable in the Terminal, you can use rsync to copy some files from one place to another and it'll give you summary stats on the speed:

rsync -a --progress --stats --human-readable path_to_source path_to_dest

E.g. rsync --stats --human-readable ~/Desktop/Large-File /Volumes/OtherDisk/Dir

You can also type into the terminal just the command:

rsync -a --progress --stats --human-readable 

(note there needs to be one or more spaces after --human-readable to end that command and break before the source and destination file names are provided)

Then drag the file / folder you wish to copy and drop it onto the terminal window, followed by dragging and dropping the destination directory. Dragging and dropping a file / folder onto a terminal window will place that file/folder's path into the terminal window. Dragging a file is preferred in most cases since it will handle a space in any folder or file name. In this case the space needs an \ to indicate not to end the file name exactly opposite of needing the space earlier.

The output of the above command will be similar to:

[jnet@Kyle ~]$ rsync -a --progress --stats --human-readable /Users/jnet/Pictures/Screen\ Caps /Volumes/Scratch 
building file list ... 
644 files to consider
Screen Caps/
Screen Caps/.DS_Store
      21.51K 100%    0.00kB/s    0:00:00 (xfer#1, to-check=642/644)
Screen Caps/Can someone downvote me please.pdf
      78.19K 100%    8.29MB/s    0:00:00 (xfer#2, to-check=641/644)
Screen Caps/Can someone downvote me please.png
     399.61K 100%   14.66MB/s    0:00:00 (xfer#3, to-check=640/644)
Screen Caps/ChefVMMemtest.png
       8.29K 100%  207.68kB/s    0:00:00 (xfer#4, to-check=639/644)
[...]
Number of files: 644
Number of files transferred: 638
Total file size: 176.85M bytes
Total transferred file size: 176.85M bytes
Literal data: 176.85M bytes
Matched data: 0 bytes
File list size: 12574
File list generation time: 0.002 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 176.92M
Total bytes received: 14.09K

sent 176.92M bytes  received 14.09K bytes  14.15M bytes/sec
total size is 176.85M  speedup is 1.00
4
  • will the file be copied to the "hard disk cache" and considered done copying? (while the data is not physically copied to the hard drive. For example, if copying a 500MB file from internal hard disk to USB drive, the data might be "read" into the OS's RAM cache, and being written to the USB drive, and while it is still writing, the file is already reported as "finished copying" and the speeding of copying is therefore stated inaccurately high.) Jun 27, 2012 at 2:14
  • 1
    @太極者無極而生 No. Files are not copied to cache. Cache only makes copy seem faster if 1. the line speed is much higher than the disk drive speed and 2. the transfer size fits entirely in the allocated cache. The cache is used such that the maximum line speed can be sustained because it's faster than any drive or transfer line. But the OS writes that cache to the disk all the time. But it's true that when there is nothing left to transfer and while the cache is still full, the OS reports the transfer as finished. That's why you need to sync or unmount/eject and wait while the buffer is emptied. HTH. Jul 24, 2015 at 8:43
  • 1
    man rsync in the Terminal and look for Cache. It looks like the OS X version of rsync opts out of OS caching. Jul 25, 2015 at 11:31
  • 1
    @JBRWilkinson the OS can make the caching transparent, but I think in this case it is rsync making the UNIX system call and use the option of "DO NOT USE CACHE", so it is pure copying to the device and nothing is in the RAM cache Oct 17, 2019 at 10:28
17

The simplest method is to just tap into the overall IO speed measurements that the system maintains.

If you like the command line, diskutil list shows you what drives map to which disk0, disk1, etc... and iostat 1 will dump the transfer speeds each second. You will need to press Control-C to quit this program when done. Also, if you want a longer measurement just change the 1 to however many seconds you want to average the IO speeds.

If you like graphs, the "Activity Monitor" will aggregate the IO from all disks. Select the tab "Disk Activity", there a live graph of either the IO per second or Throughput (Data) per second over time for all drives combined.

enter image description here

2
  • 1
    I guess this can tell a rough idea assuming the disk I/O of the other apps and of the system is minimal Nov 16, 2020 at 20:50
  • How do I get it to show me more than 3 disks? Feb 9, 2021 at 16:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .