Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm formatting my SDHC 4GB card before putting an OS on it for my Raspberry Pi.

It says "allocation unit size" 32 KB and gives me options of up to 1024 MB.

What do I do about that?

share|improve this question

You need to select a cluster size. The data is not read at the byte level, but rather in blocks. Generally, the smallest unit of storage is a sector (traditionally 512 bytes, 4096 bytes for Advanced Format drives), but even that is not how files are stored in file-systems, but rather sectors are grouped together into clusters.

Raspberry Pi itself doesn’t really have a restriction on cluster size, but the operating system you use may. Usually, any standard size will work, but typically, it depends on what kind of files you will be storing on it.

If you are going to be storing lots of tiny files, then select the smallest cluster size possible (one sector; 512 for memory cards). This way you avoid wasting space by having lots of partially unused clusters. If you are going to be storing lots of giant files, then use the largest clusters size possible (usually 64KB; I’ve never seen 1MB clusters :-o). That way you minimize the file-system’s file-management overhead which frees up a little more space for storage.

When not sure, just use 4KB clusters; that works for most general-purpose usage which is why it is usually the default.

share|improve this answer

For an sdhc card, it's wise to choose a size that matches and is aligned with the size used by the controller on the sd card. You'll get much better performance out of a card where the filesystem is aligned on an erase block boundary, and does it's I.O in internal segment sized units.

The size needed varies from card to card. You can use flashbench to work out what the allocation unit and erase size are.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .