▲ | DanielHB a day ago | ||||||||||||||||||||||
I got a raspberry 4 recently and was tinkering with it. I was appalled at the apparent disk IO performance of the thing, opening a browser takes several seconds. Is that just me or do I have a particularly crappy SD card? Anyone got any tips on how to improve disk IO? Would a USB3 external drive help with this? | |||||||||||||||||||||||
▲ | justin66 a day ago | parent | next [-] | ||||||||||||||||||||||
> Would a USB3 external drive help with this? Emphatically yes. It's an entirely different experience using a RPi 4 with a quality SSD. [0] It's also more expensive, so you have to decide whether that's important to you. [0] https://www.samsung.com/us/computing/memory-storage/portable... In my opinion it's a mistake to split the difference with a cheap SSD or one you need to plug in using a SATA to USB adapter. (troubleshooting first step: if it's not the power supply, it's the SATA to USB adapter...) | |||||||||||||||||||||||
▲ | antihero a day ago | parent | prev | next [-] | ||||||||||||||||||||||
Perhaps the M.2 HAT+ and a decent SSD? USB3 could plausibly be faster than the SD card as the spec allows for 5Gbps+ but I don't know about Pis that much, I'd defer to someone with experience. As a photographer I can tell you that SD cards, even high class ones have laughably awful speeds - any proper camera that needs to do video will use CFexpress Type B cards which are tremendously faster. | |||||||||||||||||||||||
| |||||||||||||||||||||||
▲ | bmicraft 15 hours ago | parent | prev | next [-] | ||||||||||||||||||||||
I'm always astounded how little people know about this, but you need to get an Application Class rated card, preferably A2. [1] The application rating essentially ensures a certain minimum IOPS performance, which is critical because most cards are only intended for sequential reads/writes. [1] https://en.wikipedia.org/wiki/SD_card#Application_Performanc... | |||||||||||||||||||||||
▲ | teamonkey a day ago | parent | prev | next [-] | ||||||||||||||||||||||
The Pi 4's IO is not great, but the choice of SD card affects it a lot. Brand seems to have more of an impact than speed (or at least the stated speed of the card). Cheap knockoffs will absolutely kill performance. That's why Raspberry Pi started selling their own branded SD cards. Using an external USB3 drive also helps but it's still pretty slow. I found it too slow to use as a SAMBA file server when connected over WiFi, even though it was hardly pushing the CPU or memory. It would regularly fail to transfer large files. One of the main selling points of the Pi 5 is faster IO. I'd love to see something tiny and power-sipping like the Zero but with the enhanced IO of the Pi 5. | |||||||||||||||||||||||
| |||||||||||||||||||||||
▲ | cillian64 a day ago | parent | prev | next [-] | ||||||||||||||||||||||
There is quite a bit of variation between SD cards, browser taking several seconds is surprisingly bad. On Pi 4 I use a 2.5" SATA SSD (WD blue) on a startech USB3 adaptor and the performance seems to me much better than even good quality microsd cards. | |||||||||||||||||||||||
▲ | esskay a day ago | parent | prev | next [-] | ||||||||||||||||||||||
No it's not just you. I/O on the Pi4 and below is awful, but for most applications it doesn't matter. Not sure on the Pi 5 as I jumped ship after the scalping and overall negativity around the foundation's activities in the last few years but I expect it's a fair bit better. | |||||||||||||||||||||||
▲ | Joel_Mckay a day ago | parent | prev [-] | ||||||||||||||||||||||
In general, sdcards are slow... most use kernel cache lazy page flush if the pi4 has 8GB ram, and F2FS to improve flash reliability. After, "sudo apt-get install preload" it will cause previously used programs from the last session to auto-cache into ram. Combined with the above setting, the usual programs will launch much faster. There is also the option to use an external SSD drive for better performance. Part of the fun of pi4 was getting the OS optimized, but unless you have a legitimate "Sandisk Extreme Pro U3" or >30MB/sec rated sdcard it can still be slow (people have seen 4MB/sec on old counterfeit cards.) sdcard bus overclocking is a thing as the pi tries to maximize slow hardware compatibility by default. Note this feature is limited on the pi4, but can significantly decrease boot times on older models. YMMV =) |