copying files (speed)
Owen Townend
owen.townend at gmail.com
Mon May 18 07:59:54 UTC 2009
2009/5/18 Johnny Rosenberg <gurus.knugum at gmail.com>:
> 2009/5/17 Rick <rick0009 at gmail.com>:
>> On Sun, 17 May 2009 10:10:29 -0400
>> Rashkae <ubuntu at tigershaunt.com> wrote:
>>
>>> cd /some/directory/with/3.8G/small/files
>>> tar -cf /dev/null .
>>
>> I've tried, you command line idea, however...
>> it does not display the threw output of the hard,
>> there is nothing displayed. NO MB/s
>
> Well, I used the time command, then I calculated the speed ”manually”…
> If you want to know what's going on, then try:
> cp -rv /from/here /to/here/
[snip]
Instead of this, there are other, easier, ways of calculating the speed:
1) Use 'dd'. It will output stats at the end of a copy (finish or ctrl-c)
or in realtime if you background it and send it USR1
e.g.
$ tar -cf - . |dd of=/dev/null
857060+0 records in
857060+0 records out
438814720 bytes (439 MB) copied, 3.91348 s, 112 MB/s
2) Try installing 'pv'. It sits in a pipe and will output stats
to stderr in realtime.
e.g.
$ tar -cf - . |pv > /dev/null
472MB 0:00:09 [ 51MB/s]
3) ntfs seems particularly cpu intensive under linux.
You can test the disk speed independant of the filesystem
type using hdparm:
e.g.
$ sudo hdparm -Tt /dev/sda
/dev/sda:
Timing cached reads: 11766 MB in 2.00 seconds = 5889.12 MB/sec
Timing buffered disk reads: 118 MB in 3.09 seconds = 38.18 MB/sec
cheers,
Owen.
More information about the ubuntu-users
mailing list