Posts: 1399
Joined: Tue Aug 09, 2011 10:53 pm

Re: Optimizing Linux for Flash memory.

Tue Jun 05, 2012 6:01 pm

Hey just got y pi (yeah !), Looking around for an SD card...

Has anyone bothered to test if the optimizations listed above have any impact at all on the SD ? Are they by default in the Pi images ?

Posts: 3
Joined: Fri Oct 12, 2012 5:25 pm

Re: Optimizing Linux for Flash memory.

Sun Oct 14, 2012 12:49 pm

Hi obarthelemy,
are you still working on that topic?

I'm currently reading a lot about improving performance of a linux system installed on SD cards. In my eyes you can kick all those listed tutorials, especially regarding SSDs, away ;) They can all be replaced by the LWN article that has already been posted by asb.

The article describes how SD cards work and why performance problems occur. The author, Arnd Bergmann, also provides a tool called flashbench to determine the right erase block size. With the right erase block size in mind you can re-partition and re-format your sd card to receive well aligned partitions. Another important factor is the number of open erase blocks the sd card controller can handle at the same time. This can have a real impact on the choice of the underlying filesystem. This is what Arnd is presenting in the video of the Embedded Linux Con Europe 2011 (also linked by asb) - have a look at 30:00min.

So, what's next?
What we need is a tutorial how to get well aligned partitions for SD Card that will work in raspberry pi. I just received a brandnew 8GB SanDisk Extreme Class 10 SDHC Card. I can start with that card showing how flashbench works and how to determine the correct erase block size.

Further, I have a script (modified version of a sd card preparing script from the beagle board community) that generates two well-aligned partitions for the most of currently available erase block sizes. The script assumes that the erase block size is a multiple of 1.5, 2, 3, 4, 6, or 8 MiB. If you have a closer look at the official wheezy raspi image, you'll see that the first partition is aligned to 4MB and the second to 60MB. Many cards have a 8MB erase block size and with that partition table they will provide not the best performance.

So, where's the best place to put this tutorial? (Wiki, blog-entry on my website, or this thread?)

Bye, Holger

Return to “Other projects”

Who is online

Users browsing this forum: xMad256 and 8 guests