Discard should be whitelisted for bcache devices

Bug #1872665 reported by Trent Lloyd
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceph OSD Charm
Triaged
Wishlist
Unassigned

Bug Description

Discard should be whitelisted for bcache devices

Currently should_enable_discard checks to see if we should enable discard based on the SATA version number. Unless "smartctl" works on the device and returns that the device is SATA 3.0 or newer then it will always disable discard - with exceptions added for /dev/nvme* and /dev/vd* devices.

We should also add exceptions for bcache devices, as bcache supports Discard and will prune data in the cache that hasn't yet been written back to the backing disks and prevent the no longer required data from being written.

This is a critical optimization since bluestore is Copy-On-Write. If data is changed its written to a new area of the disk each time - so the same data being overwritten multiple times will get written back to the backing disk multiple times without Discard enabled.

Tags: seg
Revision history for this message
Trent Lloyd (lathiat) wrote :

May also need to check if vault is enabling trim to allow this to work in practice: https://tracker.ceph.com/issues/36532

tags: added: seg
Changed in charm-ceph-osd:
status: New → Triaged
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.