5 ms·
Installing OS into a usb2 drive would’ve been plenty fast, it’s like 60 MB/s but you still get fast random I/O.
by shadowpho 2y ago
Installing OS into a usb2 drive would’ve been plenty fast, it’s like 60 MB/s but you still get fast random I/O.
- granra 2y agoNot mentioned in the post but I also run some light server workloads on this machine and things were annoyingly slow with a USB 2.0 thumb drive. I'm not gonna pretend that the real reason for making this wasn't because I have fun tinkering though.
- redundantly 2y ago60MB/s (480Mbps) is a marketing number. The actual maximum is 43MB/s. The real world speeds are 30-40MB/s if you're doing either writes or reads only. USB 2.0 is half duplex, so if you're reading and writing simultaneously it will be half, or worse, of the real world maximum, which is what will happen if you're using it as the OS disk. The random I/O isn't that great either. The max you'll be able to get is ~200 IOPs for sequential reads/writes. Even flash storage takes a bit of a hit when doing random I/O vs sequential. Also, flash storage is often slower at writing than reading, that degrades performance even further. USB 2.0 will work okay for many NAS boot disk scenarios, but it will be an absolute slog when performing reboots, configuration changes, accessing logs, performing updates, installing new packages, so on and so forth. If you can avoid it, don't use USB 2.0 for your boot device :)
- shadowpho 2y agoInteresting, I did usb2 for a while on a pi3(?) and it worked decently well. Why is iops only 200?
- redundantly 2y agoIt'll work, but for things like FreeNAS/TruNAS/OMV where there's a decent amount of logging occurring and standard activities need to be done (configuration changes, updates, etc) the poor performance rears its ugly head. As for the rPi3, you won't notice the difference, usually, between an external USB flash drive and the built-in MicroSD slot because they both go over the same USB controller. When you do notice differences it'll have to do with the quality and speed of the particular microsd cards and usb flash devices you use. The limitation of IOPs has to do with how the communication works and the limits to frame sizes and amount of frames that can be transmitted at the same time. The bus fills up quickly when lots of traffic is occurring. The USB 2.0 spec was released over twenty years ago. At that time the performance was incredible, but only in comparison to USB 1.x. If all you have available to you is USB 2.0 for your OS/boot storage, then by all means use it, however if you don't need to, if you can avoid it, don't use it. Leave those ports open for your keyboard and mouse. ;)