Forums

Home / Forums

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

bdev_enable_discard TRIM on underlying SSDs

Hi!

I've noticed that sometimes the writes to our SSDs (Crucial MX500s) are a lot slower than usual. It's not a *massive* issue as we're using NVMEs for caching anyway, but it does seem to push up the read latency a little while it's occurring. I wondered if it may be as there's no TRIMs getting sent and it's slow when it's needing to overwrite flash that hasn't been freed?

Would enabling the bdev_enable_discard option help, any do you have any recommendations around this? It seems the default is to not do this.

Thanks!

Do you think enabling this OSD parameter will have any positive effect? Have you tried it before?

Since you mention you use write cache, it could be due to write cache flushing.
You can tune cache parameters in:
/opt/petasan/config/tuning/current/writecache
then run script
/opt/petasan/scripts/tuning/writecache_tune.py
params are exaplained at top of script

Typically write caching is not used with ssd backing devices.

Ahh okay - I've tried tweaking these parameters, but still have situations where when the cache does flush to the SSD the read latency spikes up (sometimes 250ms+)!

Do you think I'd be better just having these SSDs in as OSDs "directly" without using the cache? What about the journal? Currently we have NVMEs for the cache and journals