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
- 50 LFX Mentorship
- 103 LFX Mentorship: Linux Kernel
- 576 Linux Foundation IT Professional Programs
- 304 Cloud Engineer IT Professional Program
- 125 Advanced Cloud Engineer IT Professional Program
- 53 DevOps Engineer IT Professional Program
- 61 Cloud Native Developer IT Professional Program
- 5 Express Training Courses
- 5 Express Courses - Discussion Forum
- 2K Training Courses
- 19 LFC110 Class Forum
- 7 LFC131 Class Forum
- 27 LFD102 Class Forum
- 157 LFD103 Class Forum
- 20 LFD121 Class Forum
- 1 LFD137 Class Forum
- 61 LFD201 Class Forum
- 1 LFD210 Class Forum
- LFD210-CN Class Forum
- 1 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum
- LFD237 Class Forum
- 23 LFD254 Class Forum
- 611 LFD259 Class Forum
- 105 LFD272 Class Forum
- 1 LFD272-JP クラス フォーラム
- 1 LFD273 Class Forum
- 2 LFS145 Class Forum
- 24 LFS200 Class Forum
- 739 LFS201 Class Forum
- 1 LFS201-JP クラス フォーラム
- 11 LFS203 Class Forum
- 75 LFS207 Class Forum
- 300 LFS211 Class Forum
- 54 LFS216 Class Forum
- 47 LFS241 Class Forum
- 41 LFS242 Class Forum
- 37 LFS243 Class Forum
- 11 LFS244 Class Forum
- 36 LFS250 Class Forum
- 1 LFS250-JP クラス フォーラム
- LFS251 Class Forum
- 140 LFS253 Class Forum
- LFS254 Class Forum
- 1.1K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 93 LFS260 Class Forum
- 132 LFS261 Class Forum
- 33 LFS262 Class Forum
- 80 LFS263 Class Forum
- 15 LFS264 Class Forum
- 11 LFS266 Class Forum
- 18 LFS267 Class Forum
- 17 LFS268 Class Forum
- 23 LFS269 Class Forum
- 203 LFS272 Class Forum
- 1 LFS272-JP クラス フォーラム
- LFS274 Class Forum
- LFS281 Class Forum
- 234 LFW211 Class Forum
- 172 LFW212 Class Forum
- 7 SKF100 Class Forum
- SKF200 Class Forum
- 902 Hardware
- 219 Drivers
- 74 I/O Devices
- 44 Monitors
- 115 Multimedia
- 209 Networking
- 101 Printers & Scanners
- 85 Storage
- 763 Linux Distributions
- 88 Debian
- 66 Fedora
- 15 Linux Mint
- 13 Mageia
- 24 openSUSE
- 142 Red Hat Enterprise
- 33 Slackware
- 13 SUSE Enterprise
- 357 Ubuntu
- 479 Linux System Administration
- 41 Cloud Computing
- 70 Command Line/Scripting
- Github systems admin projects
- 95 Linux Security
- 78 Network Management
- 108 System Management
- 49 Web Management
- 68 Mobile Computing
- 23 Android
- 30 Development
- 1.2K New to Linux
- 1.1K Getting Started with Linux
- 537 Off Topic
- 131 Introductions
- 217 Small Talk
- 21 Study Material
- 826 Programming and Development
- 278 Kernel Development
- 514 Software Development
- 928 Software
- 260 Applications
- 184 Command Line
- 3 Compiling/Installing
- 76 Games
- 316 Installation
- 62 All In Program
- 62 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)