Recommended GB of RAM / TB stored?

Indeed. Plus I was assuming a specific average piece size, which has gone down a lot since that time.

So, effectively, default-formatted ext4 requires 256 bytes per file for inode, and ~60 bytes per file for dirnode (file name + 8 bytes), other costs being negligible. So 1 million pieces ≈ 320 MB of metadata.

mke2fs -I 128 reduces the size of inode, making 1 million pieces’ metadata weight around 190 MB.

Now multiply by average piece size and you will get your numbers per TB stored.

I fully recommend studying ext4 documentation here: ext4 Data Structures and Algorithms — The Linux Kernel documentation, it’s pretty well-written.

2 Likes