Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Test speed of USB keychain
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
professorfrink
n00b
n00b


Joined: 05 Apr 2004
Posts: 11
Location: Winnipeg, Manitoba, Canada

PostPosted: Thu Apr 22, 2004 3:40 pm    Post subject: Test speed of USB keychain Reply with quote

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
View user's profile Send private message
Andersson
Guru
Guru


Joined: 12 Jul 2003
Posts: 525
Location: Göteborg, Sweden

PostPosted: Thu Apr 22, 2004 5:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
professorfrink
n00b
n00b


Joined: 05 Apr 2004
Posts: 11
Location: Winnipeg, Manitoba, Canada

PostPosted: Fri Apr 23, 2004 1:56 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum