Option bdev_enable_discard & bdev_async_discard in Ceph

rozaq

New Member
Nov 14, 2023
8
0
1
Hi guys,
I'm still confused about the bdev_enable_discard & bdev_enable_discard options in Ceph, if this option is activated will it trim (clean unused blocks) automatically?

I have activated it, but I don't notice any changes. and it looks like it's still the same as usual, you have to use fstrim and check the discard option.

ceph config set global bdev_enable_discard true
ceph config set global bdev_async_discard true

Maybe others can share their experiences after activating the bdev_enable_discard and bdev_async_discard options in Ceph.

Thank You
 
Whats the reason your looking for these options? I havent found any good documentation on it and afaik ceph automatically trims storage, if it gets the discard/trimming commands from the rbd above (like a Windows or Linux-VM that has Discardand SSD-Emulation enabled in VM-Hardware).

Or am I missreading this and you want something else?

Hmm: found this: https://lists.ceph.io/hyperkitty/list/ceph-users@ceph.io/thread/YFQKVCAMHHQ72AMTL2MQAA7QN7YCJ7GA/
These debates are more about if it really makes sense with modern SSDs as the performance gain seems limited.With older (SATA) SSDs it might, but with the modern NVMe DC-grade ones people are doubting if it is still needed.

Can you explain what this option should help you with?

Edit: I did ask on the mailing list if someones has a update on this. Initial question was from Dan Van der Ster.
 
Last edited: