elemental-lf / benji

Benji Backup: A block based deduplicating backup software for Ceph RBD images, iSCSI targets, image files and block devices

Home Page:https://benji-backup.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What reasonable parameter of block size when create storage path

uncelvel opened this issue · comments

Dear all brother
I using Benji for backup, and using LVM for backend storage file.
So i have a question for tuning this backend
What exactlly param of block_size when create LV for backend
64k or 128k or 4MiB

lvcreate -L 50G -i2 -I64 -n gfslv vg0

Many thanks for any sugueestion

With LVM there is no clear recommendation on the block size. It depends on the volume type, the file system structure and on the sizing of the database server. With a smaller block size the metadata in the database grows significantly in relation to the default of four megabytes but you will get better deduplication. How much better again depends on your usage pattern and the structure of the data. The compression ratio will in contrast worsen slightly with smaller block sizes.

I must admit that I have no experience with using Benji in a larger LVM setting but I suspect that small block sizes (like your stripe size of 64k) won't be worth it. I'd try block sizes like one, two or four megabytes and see if it makes a difference in your setup. I'd probably also try a test run with 64k just to see how it performs.

As a side note: If you had a thin LVM volume and we had support for thin_delta (see #59) I'd recommend an integral multiple of the chunk size.