4 ms·
For coincidence, I was searching for articles on how to optimize a SD card for a Raspberry Pi and I find this one. My RPI have a somewhat expensive Sandisk Ult
by m45t3r 11y ago
For coincidence, I was searching for articles on how to optimize a SD card for a Raspberry Pi and I find this one.
My RPI have a somewhat expensive Sandisk Ultra 32GB microSD card, however even them it was still slow to respond on random I/O (like installing a new package in it). I decided to use F2FS instead of ext4, however it didn't do much better: for some reason, the RPI kernel disable the majority of performance enhancements from F2FS by default. You can re-enable them in /etc/fstab, however after a unclear poweroff my filesystem was completely messed up. RPI wouldn't even boot. This is unacceptable.
So I decided to go back to ext4, however try to optimize for flash media. This article put me in the correct way, basically thanks to this part:
> When a filesystem wants to optimize its block allocation to the geometry of a flash drive, it needs to know the position of the segments on the drive. On partitioned media, this also implies that each partition is aligned to the start of a segment, and this is true for all preformatted SD cards and other media that require special care for segment optimizations.
Searching Google for "aligned partition Raspberry Pi" and I found those articles below that really helped to optimize my SD card performance:
* https://thelastmaimou.wordpress.com/2013/05/19/optimizing-arch-linux-image-installation-on-the-raspberry-pi/ https://thelastmaimou.wordpress.com/2013/05/19/optimizing-ar...
* https://blogofterje.wordpress.com/2012/01/14/optimizing-fs-on-sd-card/ https://blogofterje.wordpress.com/2012/01/14/optimizing-fs-o...
After aligning my partition, the RPI seems faster and much more similar behavior to a traditional HDD (however, not so fast as a SSD, of course). However, I didn't disable ext4's journal, though, since I want to reduce the chance of getting my filesystem in a unbootable state.