CephFS "Block Size"?

Mihai

Renowned Member
Dec 22, 2015
108
8
83
40
I am interested in creating a CephFS store for storing security camera footage; Essentially storing very large video files.

I don't know what CEPH calls what I know traditionally as block size, but is there a way to adjust that setting?

Are there any optimizations that I should consider for bulk video storage? My Google-fu hasn't been very successful.

Thank you.
 
The default stripe_unit size for ceph is 4M, but you may not want to raise that (and maybe even shrink it instead.)

the stripe size is a maximum "file chunk" limit for a cephfs object (file). if a file is larger than the stripe size, the next portion of the file is written to A DIFFERENT PG, which means you can make more use of a larger OSD pool for your file, and larger files obviously can benefit from having more of the file read at a given unit of time.

If you DO want to play with those values, you can set those on a filesystem level granularity like so:

setfattr -n ceph.dir.layout.stripe_unit -v [size in bytes] /mnt/cephfs/my_special_dir
setfattr -n ceph.dir.layout.object_size -v [size in bytes] /mnt/cephfs/my_special_dir

(stripe_unit can be smaller then object_size, but not the other way around. 1:1 is safe.)
 
  • Like
Reactions: Mihai
The default stripe_unit size for ceph is 4M, but you may not want to raise that (and maybe even shrink it instead.)

the stripe size is a maximum "file chunk" limit for a cephfs object (file). if a file is larger than the stripe size, the next portion of the file is written to A DIFFERENT PG, which means you can make more use of a larger OSD pool for your file, and larger files obviously can benefit from having more of the file read at a given unit of time.

If you DO want to play with those values, you can set those on a filesystem level granularity like so:

setfattr -n ceph.dir.layout.stripe_unit -v [size in bytes] /mnt/cephfs/my_special_dir
setfattr -n ceph.dir.layout.object_size -v [size in bytes] /mnt/cephfs/my_special_dir

(stripe_unit can be smaller then object_size, but not the other way around. 1:1 is safe.)

Okay that make sense thank you. Now I know what to look into further.