0

I am thinking on using btrfs for a data volume with many small files. It is unclear, what the doc states about the minimal possible block size.

It looks, they and we are on a very different edges of the reality. Their block size ideas are about to increase the block size, mine is to decrease it. They want to waste disk space, I want to spare it. I also want to decrease the uneeded discard-rewrite operations on SSD volumes.

They seem going so far that their doc is actually unclear about the minimal btrfs cluster size.

What is it? 4k? 16k? 64k?

Can I have, for example, 512 byte blocks?

2
  • Reasonable research effort is to try mkfs.btrfs -s 512 …. Commented Feb 18 at 8:27
  • @KamilMaciorowski Right, I do. But if you do it faster than me, I will give you an up and an accept. :-) Commented Feb 18 at 8:48

1 Answer 1

1

They seem going so far that their doc is actually unclear about the minimal btrfs cluster size.

A cluster is something different than a block in the context of file systems; alas, btrfs (as far as I know) avoids the "cluster" terminology altogether. Still, btrfs's tooling and their own docs use "blocksize" and "sectorsize" interchangeably (which of course, hm, this brings back memories from times when knowing what a sector size was really mattered).

Anyway, minimum block size on btrfs is 4 kB, and the "subpage" feature is there to enable usage of 4 kB block size file system data on computers where the page size is larger (e.g., 64 kB).

What might help in your small-file use case, however: In-line files allow you to store small files right in the metadata block describing files. (There's not inherently a 1:1 mapping there; a single metadata block might describe multiple files.)

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.