Forums

Home / Forums

You need to log in to create posts and topics. Login · Register

CephFS Default object size

Hi everyone,

I’m using CephFS and I’d like to confirm what the default object size is.
As far as I know, CephFS stores files as RADOS objects with a default object size of 4 MB.

Can anyone confirm if 4 MB is indeed the default in Ceph Reef, and whether it’s possible (and recommended) to reduce it to 1 MB or 2 MB?
I’m working with a very large number of small files, so I’m trying to minimize space overhead and improve small-file performance.

If it’s possible to adjust the object size, what’s the correct way to configure it in PetaSAN or CephFS and would it apply only to new files or also to existing ones?

Thanks in advance for any insights or best practices!

A large CephFS will be stored in separate objects of size 4MB (apart from end object will could be smaller).

A 1 MB file will be stored in a single object of size 1MB not 4MB.

What you may referring to in your case of small files is bluestore_min_alloc_size, the min storage allocation, a 512 b file will still consume bluestore_min_alloc_size.

bluestore_min_alloc_size default is 4 KB for SSD, for HDD it is 64 KB for older Ceph versions or 4KB for newer.