Test USB 3.0 Device Speed











up vote
2
down vote

favorite












I've looked up the hdparm command, but all examples are for testing disks. Not sure if it can be used to test external usb devices (specifically a usb flash stick).



I'm using this code right now:



dd if=/dev/zero of=/media/storage/speed_test.txt bs=100K count=1k
sudo /sbin/sysctl -w vm.drop_caches=3
dd if=$/media/storage/speed_test.txt of=/dev/null bs=100K count=1k


What are the ranges of read and write speeds I should expect? I got ~900 MB/s for write and ~500 MB/s for read and I think the numbers are too high. Am I not clearing the cache correctly? What other commands I can use to test the speed?





Update:



Thanks to user427539’s answer and zloster’s comment, I now have a more accurate measurement of speeds. I'm testing with a 16GB USB flash stick and I'm writing and reading 1 GB of data. I got 22 MB/s for writing and 46 MB/s for reading. However, aren't such speeds too slow for a USB3 flash device? Why would the speed be so low?










share|improve this question
























  • You should check the fsync options for dd when doing the writing test. More info here. Also use their setting for the sizes - at least 1GB.
    – zloster
    Mar 14 '15 at 16:03

















up vote
2
down vote

favorite












I've looked up the hdparm command, but all examples are for testing disks. Not sure if it can be used to test external usb devices (specifically a usb flash stick).



I'm using this code right now:



dd if=/dev/zero of=/media/storage/speed_test.txt bs=100K count=1k
sudo /sbin/sysctl -w vm.drop_caches=3
dd if=$/media/storage/speed_test.txt of=/dev/null bs=100K count=1k


What are the ranges of read and write speeds I should expect? I got ~900 MB/s for write and ~500 MB/s for read and I think the numbers are too high. Am I not clearing the cache correctly? What other commands I can use to test the speed?





Update:



Thanks to user427539’s answer and zloster’s comment, I now have a more accurate measurement of speeds. I'm testing with a 16GB USB flash stick and I'm writing and reading 1 GB of data. I got 22 MB/s for writing and 46 MB/s for reading. However, aren't such speeds too slow for a USB3 flash device? Why would the speed be so low?










share|improve this question
























  • You should check the fsync options for dd when doing the writing test. More info here. Also use their setting for the sizes - at least 1GB.
    – zloster
    Mar 14 '15 at 16:03















up vote
2
down vote

favorite









up vote
2
down vote

favorite











I've looked up the hdparm command, but all examples are for testing disks. Not sure if it can be used to test external usb devices (specifically a usb flash stick).



I'm using this code right now:



dd if=/dev/zero of=/media/storage/speed_test.txt bs=100K count=1k
sudo /sbin/sysctl -w vm.drop_caches=3
dd if=$/media/storage/speed_test.txt of=/dev/null bs=100K count=1k


What are the ranges of read and write speeds I should expect? I got ~900 MB/s for write and ~500 MB/s for read and I think the numbers are too high. Am I not clearing the cache correctly? What other commands I can use to test the speed?





Update:



Thanks to user427539’s answer and zloster’s comment, I now have a more accurate measurement of speeds. I'm testing with a 16GB USB flash stick and I'm writing and reading 1 GB of data. I got 22 MB/s for writing and 46 MB/s for reading. However, aren't such speeds too slow for a USB3 flash device? Why would the speed be so low?










share|improve this question















I've looked up the hdparm command, but all examples are for testing disks. Not sure if it can be used to test external usb devices (specifically a usb flash stick).



I'm using this code right now:



dd if=/dev/zero of=/media/storage/speed_test.txt bs=100K count=1k
sudo /sbin/sysctl -w vm.drop_caches=3
dd if=$/media/storage/speed_test.txt of=/dev/null bs=100K count=1k


What are the ranges of read and write speeds I should expect? I got ~900 MB/s for write and ~500 MB/s for read and I think the numbers are too high. Am I not clearing the cache correctly? What other commands I can use to test the speed?





Update:



Thanks to user427539’s answer and zloster’s comment, I now have a more accurate measurement of speeds. I'm testing with a 16GB USB flash stick and I'm writing and reading 1 GB of data. I got 22 MB/s for writing and 46 MB/s for reading. However, aren't such speeds too slow for a USB3 flash device? Why would the speed be so low?







linux ubuntu bash dd usb-3






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 21 '17 at 12:52









Magisch

1521210




1521210










asked Mar 13 '15 at 18:08









tmp

4124




4124












  • You should check the fsync options for dd when doing the writing test. More info here. Also use their setting for the sizes - at least 1GB.
    – zloster
    Mar 14 '15 at 16:03




















  • You should check the fsync options for dd when doing the writing test. More info here. Also use their setting for the sizes - at least 1GB.
    – zloster
    Mar 14 '15 at 16:03


















You should check the fsync options for dd when doing the writing test. More info here. Also use their setting for the sizes - at least 1GB.
– zloster
Mar 14 '15 at 16:03






You should check the fsync options for dd when doing the writing test. More info here. Also use their setting for the sizes - at least 1GB.
– zloster
Mar 14 '15 at 16:03












1 Answer
1






active

oldest

votes

















up vote
0
down vote













First that is only 100MB that you are writing. The disk and controller also have a cache that you aren't dropping, so you need a bigger test to make sure those caches aren't corrupting the results.



Bump that up at least 1GB. Maybe by changing to bs=1M. I normally test with 10GB just to be sure.



Then you need to make sure the data actually gets to disk, add "conv=fdatasync" at the end of the first line to do that.



As to normal speeds, USB2 devices / ports normally do between 10 and 20 MB/sec. USB3 devices should be between 50 and 150MB/sec. I'm very happy if I see a new device hit 120MB/sec. That's 7.2GB/min which is really fast.



But be aware a rotating disk reads/writes at the speed the platter spins under the head. Thus it you know the density (bits/inch) you can calculate the data speed:



throughput = radius * 2PI * density * RPM



The density you can't really control, but the RPM you can, the more RPMs the faster the raw speed.



Also, note that the radius of the platter changes based on where the head is. It might be about 1.75 inches on the outer track, but only 0.75 inches on the inner track. That means the drive will really slow down as you move from the outer track to the inner. Virgin drives typically have you writing to the outer track first, so you get much better speed at first. As the drive fills up it gets slower. I routinely see a 50% drop off in performance with a almost full drive.






share|improve this answer





















  • Is there a way to safely clear the controller cache? I'm actually testing with a USB flash stick. Is there a way to test a small one with, say, only 512 MB capacity ?
    – tmp
    Mar 16 '15 at 16:00










  • Well, you can be assured assured that a cold boot will have empty cache unless you have batteries in you case. (Some raid controllers really do have their own batteries). For the thumb drive, pulling it and reinserting is the only way I know to clear the cache. Seriously, those are the only 2 ways I know.
    – user427539
    Mar 17 '15 at 19:49












  • RE: your new speeds. Thumb drives are very low cost devices. I've never benchmarked them, but I doubt your speeds are way off of reality. The devices are probably just slow. Benchmark an external USB3 rotating disk and you should see better speeds.
    – user427539
    Mar 17 '15 at 19:55











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f889287%2ftest-usb-3-0-device-speed%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













First that is only 100MB that you are writing. The disk and controller also have a cache that you aren't dropping, so you need a bigger test to make sure those caches aren't corrupting the results.



Bump that up at least 1GB. Maybe by changing to bs=1M. I normally test with 10GB just to be sure.



Then you need to make sure the data actually gets to disk, add "conv=fdatasync" at the end of the first line to do that.



As to normal speeds, USB2 devices / ports normally do between 10 and 20 MB/sec. USB3 devices should be between 50 and 150MB/sec. I'm very happy if I see a new device hit 120MB/sec. That's 7.2GB/min which is really fast.



But be aware a rotating disk reads/writes at the speed the platter spins under the head. Thus it you know the density (bits/inch) you can calculate the data speed:



throughput = radius * 2PI * density * RPM



The density you can't really control, but the RPM you can, the more RPMs the faster the raw speed.



Also, note that the radius of the platter changes based on where the head is. It might be about 1.75 inches on the outer track, but only 0.75 inches on the inner track. That means the drive will really slow down as you move from the outer track to the inner. Virgin drives typically have you writing to the outer track first, so you get much better speed at first. As the drive fills up it gets slower. I routinely see a 50% drop off in performance with a almost full drive.






share|improve this answer





















  • Is there a way to safely clear the controller cache? I'm actually testing with a USB flash stick. Is there a way to test a small one with, say, only 512 MB capacity ?
    – tmp
    Mar 16 '15 at 16:00










  • Well, you can be assured assured that a cold boot will have empty cache unless you have batteries in you case. (Some raid controllers really do have their own batteries). For the thumb drive, pulling it and reinserting is the only way I know to clear the cache. Seriously, those are the only 2 ways I know.
    – user427539
    Mar 17 '15 at 19:49












  • RE: your new speeds. Thumb drives are very low cost devices. I've never benchmarked them, but I doubt your speeds are way off of reality. The devices are probably just slow. Benchmark an external USB3 rotating disk and you should see better speeds.
    – user427539
    Mar 17 '15 at 19:55















up vote
0
down vote













First that is only 100MB that you are writing. The disk and controller also have a cache that you aren't dropping, so you need a bigger test to make sure those caches aren't corrupting the results.



Bump that up at least 1GB. Maybe by changing to bs=1M. I normally test with 10GB just to be sure.



Then you need to make sure the data actually gets to disk, add "conv=fdatasync" at the end of the first line to do that.



As to normal speeds, USB2 devices / ports normally do between 10 and 20 MB/sec. USB3 devices should be between 50 and 150MB/sec. I'm very happy if I see a new device hit 120MB/sec. That's 7.2GB/min which is really fast.



But be aware a rotating disk reads/writes at the speed the platter spins under the head. Thus it you know the density (bits/inch) you can calculate the data speed:



throughput = radius * 2PI * density * RPM



The density you can't really control, but the RPM you can, the more RPMs the faster the raw speed.



Also, note that the radius of the platter changes based on where the head is. It might be about 1.75 inches on the outer track, but only 0.75 inches on the inner track. That means the drive will really slow down as you move from the outer track to the inner. Virgin drives typically have you writing to the outer track first, so you get much better speed at first. As the drive fills up it gets slower. I routinely see a 50% drop off in performance with a almost full drive.






share|improve this answer





















  • Is there a way to safely clear the controller cache? I'm actually testing with a USB flash stick. Is there a way to test a small one with, say, only 512 MB capacity ?
    – tmp
    Mar 16 '15 at 16:00










  • Well, you can be assured assured that a cold boot will have empty cache unless you have batteries in you case. (Some raid controllers really do have their own batteries). For the thumb drive, pulling it and reinserting is the only way I know to clear the cache. Seriously, those are the only 2 ways I know.
    – user427539
    Mar 17 '15 at 19:49












  • RE: your new speeds. Thumb drives are very low cost devices. I've never benchmarked them, but I doubt your speeds are way off of reality. The devices are probably just slow. Benchmark an external USB3 rotating disk and you should see better speeds.
    – user427539
    Mar 17 '15 at 19:55













up vote
0
down vote










up vote
0
down vote









First that is only 100MB that you are writing. The disk and controller also have a cache that you aren't dropping, so you need a bigger test to make sure those caches aren't corrupting the results.



Bump that up at least 1GB. Maybe by changing to bs=1M. I normally test with 10GB just to be sure.



Then you need to make sure the data actually gets to disk, add "conv=fdatasync" at the end of the first line to do that.



As to normal speeds, USB2 devices / ports normally do between 10 and 20 MB/sec. USB3 devices should be between 50 and 150MB/sec. I'm very happy if I see a new device hit 120MB/sec. That's 7.2GB/min which is really fast.



But be aware a rotating disk reads/writes at the speed the platter spins under the head. Thus it you know the density (bits/inch) you can calculate the data speed:



throughput = radius * 2PI * density * RPM



The density you can't really control, but the RPM you can, the more RPMs the faster the raw speed.



Also, note that the radius of the platter changes based on where the head is. It might be about 1.75 inches on the outer track, but only 0.75 inches on the inner track. That means the drive will really slow down as you move from the outer track to the inner. Virgin drives typically have you writing to the outer track first, so you get much better speed at first. As the drive fills up it gets slower. I routinely see a 50% drop off in performance with a almost full drive.






share|improve this answer












First that is only 100MB that you are writing. The disk and controller also have a cache that you aren't dropping, so you need a bigger test to make sure those caches aren't corrupting the results.



Bump that up at least 1GB. Maybe by changing to bs=1M. I normally test with 10GB just to be sure.



Then you need to make sure the data actually gets to disk, add "conv=fdatasync" at the end of the first line to do that.



As to normal speeds, USB2 devices / ports normally do between 10 and 20 MB/sec. USB3 devices should be between 50 and 150MB/sec. I'm very happy if I see a new device hit 120MB/sec. That's 7.2GB/min which is really fast.



But be aware a rotating disk reads/writes at the speed the platter spins under the head. Thus it you know the density (bits/inch) you can calculate the data speed:



throughput = radius * 2PI * density * RPM



The density you can't really control, but the RPM you can, the more RPMs the faster the raw speed.



Also, note that the radius of the platter changes based on where the head is. It might be about 1.75 inches on the outer track, but only 0.75 inches on the inner track. That means the drive will really slow down as you move from the outer track to the inner. Virgin drives typically have you writing to the outer track first, so you get much better speed at first. As the drive fills up it gets slower. I routinely see a 50% drop off in performance with a almost full drive.







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 13 '15 at 22:30









user427539

1




1












  • Is there a way to safely clear the controller cache? I'm actually testing with a USB flash stick. Is there a way to test a small one with, say, only 512 MB capacity ?
    – tmp
    Mar 16 '15 at 16:00










  • Well, you can be assured assured that a cold boot will have empty cache unless you have batteries in you case. (Some raid controllers really do have their own batteries). For the thumb drive, pulling it and reinserting is the only way I know to clear the cache. Seriously, those are the only 2 ways I know.
    – user427539
    Mar 17 '15 at 19:49












  • RE: your new speeds. Thumb drives are very low cost devices. I've never benchmarked them, but I doubt your speeds are way off of reality. The devices are probably just slow. Benchmark an external USB3 rotating disk and you should see better speeds.
    – user427539
    Mar 17 '15 at 19:55


















  • Is there a way to safely clear the controller cache? I'm actually testing with a USB flash stick. Is there a way to test a small one with, say, only 512 MB capacity ?
    – tmp
    Mar 16 '15 at 16:00










  • Well, you can be assured assured that a cold boot will have empty cache unless you have batteries in you case. (Some raid controllers really do have their own batteries). For the thumb drive, pulling it and reinserting is the only way I know to clear the cache. Seriously, those are the only 2 ways I know.
    – user427539
    Mar 17 '15 at 19:49












  • RE: your new speeds. Thumb drives are very low cost devices. I've never benchmarked them, but I doubt your speeds are way off of reality. The devices are probably just slow. Benchmark an external USB3 rotating disk and you should see better speeds.
    – user427539
    Mar 17 '15 at 19:55
















Is there a way to safely clear the controller cache? I'm actually testing with a USB flash stick. Is there a way to test a small one with, say, only 512 MB capacity ?
– tmp
Mar 16 '15 at 16:00




Is there a way to safely clear the controller cache? I'm actually testing with a USB flash stick. Is there a way to test a small one with, say, only 512 MB capacity ?
– tmp
Mar 16 '15 at 16:00












Well, you can be assured assured that a cold boot will have empty cache unless you have batteries in you case. (Some raid controllers really do have their own batteries). For the thumb drive, pulling it and reinserting is the only way I know to clear the cache. Seriously, those are the only 2 ways I know.
– user427539
Mar 17 '15 at 19:49






Well, you can be assured assured that a cold boot will have empty cache unless you have batteries in you case. (Some raid controllers really do have their own batteries). For the thumb drive, pulling it and reinserting is the only way I know to clear the cache. Seriously, those are the only 2 ways I know.
– user427539
Mar 17 '15 at 19:49














RE: your new speeds. Thumb drives are very low cost devices. I've never benchmarked them, but I doubt your speeds are way off of reality. The devices are probably just slow. Benchmark an external USB3 rotating disk and you should see better speeds.
– user427539
Mar 17 '15 at 19:55




RE: your new speeds. Thumb drives are very low cost devices. I've never benchmarked them, but I doubt your speeds are way off of reality. The devices are probably just slow. Benchmark an external USB3 rotating disk and you should see better speeds.
– user427539
Mar 17 '15 at 19:55


















draft saved

draft discarded




















































Thanks for contributing an answer to Super User!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f889287%2ftest-usb-3-0-device-speed%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

Eduardo VII do Reino Unido