Welcome to the Linux Foundation Forum!
Troubleshooting, limit speed of USB3 device on USB2 computer.
Since the USB3 memory sticks are really fast I expect they would maximize the speed of the USB2 port (480Mbit/s). I tried two sticks. With Disk Utility I got a sustained read speed of 40Mbyte/s but when I tried the write I only got around 10Mbyte/s. During write the speed frequently went down to very low after starting at 35Mbyte/s. I tried several of the latest distros and the result were the same.
The plan was to try to set a hard limit on the speed to and from the USB3 device. I didnt find any such commands. Could I tunnel the USB traffic trough a simulated network device I then can traffic shape?
0
Comments
-
It looks like disk utility is a gui for hdparm and some other tools. have you attempted to use any of the common hard drive benchmarking software on the drive?0
-
I think its accurate the result with file copy gets the same mean speed. Could you help me with usbnet driver under debian squeeze. I don’t know how to get usb0.0
-
You need to understand that flash devices (thumb drives, SD cards, memory sticks) are MUCH faster at reading than writing. For SD cards, there are 10 classes of card (less actually, but they go from 1 to 10). The slowest you can get in the market is a class 2, and the fastest is a class 10. Most are class 6. The difference in write speeds is considerable. The difference in read speeds is not so much. So, just because a USB thumb drive is a USB 3.0 device and can read back data at 40MBps (320mbps) on a USB 2.0 port, it does NOT mean you can write at 320mbps on a USB 2.0, or even a USB 3.0, port at that speed! My experience is that 100mbps (12.5MBps) is about as fast as you are going to see. Isn't advertising/marketing great? :rolleyes:0
-
If you look at the graph you see that write isnt stable. From 35MB/s down to 1 MB/s. What I would like to do is to limit the speed somehow to see at what speed it is stable.0
-
Try the tests after:
sysctl vm.dirty_background_ratio = 10
0 -
There is also the mount settings. Mostly, USB/SD devices are mounted with the flush option. As a result, the buffered data is flushed to device more frequently, resulting in the "stuttering" behavior you are seeing. I experience this myself when copying big data sets to flash devices. Personally, I don't think there is much you can do about it. Flash discs on the other hand, have controllers that help level the I/O, especially when writing to disc/device.0
-
Finally, I have several 32GB class 10 SD cards, and when I start to copy a large data set to them, they run incredibly fast! After awhile, they start to exhibit the behavior you are seeing, leveling out at about 100mbps (mega bits, not bytes per second), 12.5MBps. If I copy a smaller (but still sizable) data set, that will fit into cache, the copy is immediate, but then I notice that the device is still busy as the system flushes the cache. I think the lesson here is "Don't believe everything you see!"... or think you see. :-)0
-
[Possibly closer to a solution]
For the fun of it I made a RAID0 volume of two 15GB partitions both on the 32GB USB3 memorystick. ( Use mdadm ). This seems to have solved the speed problem. I got a mean speed of 31MB/s write and 35MB/s read on the USB2 port. The file was over 4GB.
Any thoughts why?
0 -
There are a lot of factors at play here - the amount of RAM in your system that can be used as cache, the type of device (class 2...10), the interface (USB 3.0 in this case, assuming the system also has a USB 3.0 port), how new the device is, ... Try writing not 4GB, but 10+ GB to the device, and then run the sync command and see how long it takes before it finishes. THAT is the salient factor here. Even in your example, write 4GB, and then run sync and see how long it takes to finish flushing the data to the device so that it is removable.0
-
I did the same tests with a 11.5GB file. RAID0 was not necessary, an ordinary volume with FAT or NTFS got the same results. Due to some update? I don't know. However the transfer of 1000+ music or image files were crippled, below 5MB/s. I don't have USB3 on this computer. Could you check the average speed you get when copying a folder with 1000+ images.
Because of the many problems with flash memory sticks I wonder if its not better to abandon them as a recommended portable storage for larger devices. Now that we have SSD that are dropping in price couldn't we just buy SSD's in the form of a memory stick?
I kind of liked but haven't tested those dual eSata/USB interface SSD that looks like memory sticks. If they perform well and get cheaper we could easily spread the use of Linux through teaching a detachable dualboot configuration.0 -
Searched around a little and found the Supertalent USB 3.0 Express RC8. It has a SSD controller. Im happy to see that they also posted the USB2 benchmark. It seem to max out the USB2 port at over 35 MB/s even for small files which is what I wanted in the first place. So I guess you need to select more carefully among the cheap memorysticks even if you only have a USB2 port.0
Categories
- All Categories
- 208 LFX Mentorship
- 208 LFX Mentorship: Linux Kernel
- 738 Linux Foundation IT Professional Programs
- 340 Cloud Engineer IT Professional Program
- 167 Advanced Cloud Engineer IT Professional Program
- 67 DevOps Engineer IT Professional Program
- 133 Cloud Native Developer IT Professional Program
- 123 Express Training Courses
- 123 Express Courses - Discussion Forum
- 6K Training Courses
- 40 LFC110 Class Forum - Discontinued
- 67 LFC131 Class Forum
- 40 LFD102 Class Forum
- 223 LFD103 Class Forum
- 18 LFD110 Class Forum
- 35 LFD121 Class Forum
- 18 LFD133 Class Forum
- 7 LFD134 Class Forum
- 18 LFD137 Class Forum
- 71 LFD201 Class Forum
- 4 LFD210 Class Forum
- 3 LFD210-CN Class Forum
- 2 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum - Discontinued
- 2 LFD233 Class Forum
- 4 LFD237 Class Forum
- 24 LFD254 Class Forum
- 690 LFD259 Class Forum
- 111 LFD272 Class Forum
- 4 LFD272-JP クラス フォーラム
- 11 LFD273 Class Forum
- 117 LFS101 Class Forum
- 1 LFS111 Class Forum
- 3 LFS112 Class Forum
- 2 LFS116 Class Forum
- 4 LFS118 Class Forum
- 4 LFS142 Class Forum
- 5 LFS144 Class Forum
- 4 LFS145 Class Forum
- 2 LFS146 Class Forum
- 3 LFS147 Class Forum
- 9 LFS151 Class Forum
- 2 LFS157 Class Forum
- 19 LFS158 Class Forum
- 6 LFS162 Class Forum
- 2 LFS166 Class Forum
- 4 LFS167 Class Forum
- 2 LFS170 Class Forum
- 2 LFS171 Class Forum
- 3 LFS178 Class Forum
- 3 LFS180 Class Forum
- 2 LFS182 Class Forum
- 5 LFS183 Class Forum
- 31 LFS200 Class Forum
- 737 LFS201 Class Forum - Discontinued
- 3 LFS201-JP クラス フォーラム
- 18 LFS203 Class Forum
- 119 LFS207 Class Forum
- 2 LFS207-DE-Klassenforum
- 1 LFS207-JP クラス フォーラム
- 302 LFS211 Class Forum
- 56 LFS216 Class Forum
- 51 LFS241 Class Forum
- 46 LFS242 Class Forum
- 38 LFS243 Class Forum
- 14 LFS244 Class Forum
- 2 LFS245 Class Forum
- 46 LFS250 Class Forum
- 2 LFS250-JP クラス フォーラム
- 1 LFS251 Class Forum
- 148 LFS253 Class Forum
- 1 LFS254 Class Forum
- 1 LFS255 Class Forum
- 7 LFS256 Class Forum
- 1 LFS257 Class Forum
- 1.2K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 117 LFS260 Class Forum
- 158 LFS261 Class Forum
- 42 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 24 LFS267 Class Forum
- 19 LFS268 Class Forum
- 30 LFS269 Class Forum
- 201 LFS272 Class Forum
- 2 LFS272-JP クラス フォーラム
- 1 LFS274 Class Forum
- 4 LFS281 Class Forum
- 9 LFW111 Class Forum
- 258 LFW211 Class Forum
- 181 LFW212 Class Forum
- 13 SKF100 Class Forum
- 1 SKF200 Class Forum
- 1 SKF201 Class Forum
- 791 Hardware
- 199 Drivers
- 68 I/O Devices
- 37 Monitors
- 98 Multimedia
- 174 Networking
- 91 Printers & Scanners
- 85 Storage
- 755 Linux Distributions
- 82 Debian
- 67 Fedora
- 16 Linux Mint
- 13 Mageia
- 23 openSUSE
- 147 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 352 Ubuntu
- 465 Linux System Administration
- 39 Cloud Computing
- 71 Command Line/Scripting
- Github systems admin projects
- 91 Linux Security
- 78 Network Management
- 101 System Management
- 47 Web Management
- 56 Mobile Computing
- 17 Android
- 28 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 366 Off Topic
- 114 Introductions
- 171 Small Talk
- 20 Study Material
- 534 Programming and Development
- 293 Kernel Development
- 223 Software Development
- 1.2K Software
- 212 Applications
- 182 Command Line
- 3 Compiling/Installing
- 405 Games
- 312 Installation
- 79 All In Program
- 79 All In Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)