View previous topic :: View next topic |
Author |
Message |
professorfrink n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/1675184174087e76ca9fa1.jpg)
Joined: 05 Apr 2004 Posts: 11 Location: Winnipeg, Manitoba, Canada
|
Posted: Thu Apr 22, 2004 3:40 pm Post subject: Test speed of USB keychain |
|
|
How can I test the speed of data transfer from a USB keychain device.
The device is seen as /dev/sda.
I have tried hdparm for this but it fails with the following error:
hdparm -t /dev/sda
Timing buffered disk reads: read() failed: Success
Thanks |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Andersson Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/16562293853fedf8cdcf2e7.png)
Joined: 12 Jul 2003 Posts: 525 Location: Göteborg, Sweden
|
Posted: Thu Apr 22, 2004 5:43 pm Post subject: |
|
|
Move a large file to the usb stick and time the operation. Unmount, remount and copy it to the hard disk. The reason for unmounting is to make sure everything is written when the copy command exits. This should be the case if you use the sync option when you mount it, but you never know...
I was going to suggest this thing below, but after I finished testing and moved everything back to the usb disk, I got a much lower transfer rate. Perhaps you get better results if you use /dev/random instead of /dev/zero?
First I wrote: | Assuming you have 64 Mb free on the disk, and it's mounted as /mnt/usb:
time dd if=/dev/zero of=/mnt/usb/testfile bs=16k count=4096 && umount /mnt/usb
Then remount and read it:
time dd if=/mnt/usb/testfile of=/dev/null bs=16k && umount /mnt/usb
Then just divide size/time. |
Do it a few times to get an average if you're picky. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
professorfrink n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/1675184174087e76ca9fa1.jpg)
Joined: 05 Apr 2004 Posts: 11 Location: Winnipeg, Manitoba, Canada
|
Posted: Fri Apr 23, 2004 1:56 pm Post subject: |
|
|
Thanks.
I just wanted to verify that the device wouldn't create a bottleneck as I plan to use it for a mirror copy of the database log. This test proved that it won't cause any problems. _________________ Me fail English? That's unpossible! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|