On 13/04/2021 11:07, Dan van der Ster wrote:
On Tue, Apr 13, 2021 at 9:00 AM Wido den Hollander <wido@42on.com> wrote:
On 4/12/21 5:46 PM, Dan van der Ster wrote:
Hi all,
bdev_enable_discard has been in ceph for several major releases now but it is still off by default. Did anyone try it recently -- is it safe to use? And do you have perf numbers before and after enabling?
I have done so on SATA SSDs in a few cases and: it worked
Did I notice a real difference? Not really.
Thanks, I've enabled it on a test box and am draining data to check that it doesn't crash anything.
It's highly debated if this still makes a difference with modern flash devices. I don't think there is a real conclusion if you still need to trim/discard blocks.
Do you happen to have any more info on these debates? As you know we have seen major performance issues on hypervisors that are not running a periodic fstrim; we use similar or identical SATA ssds for HV local storage and our block.db's. If it doesn't hurt anything, why wouldn't we enable it by default?
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. SATA 3.0 also had the issue that the TRIM command was a blocking command where with SATA 3.1 it became async and thus non-blocking. With NVMe it is a different story again. I don't have links or papers for you, it's mainly stories I heard on conferences and such. Wido
Cheers, Dan