Bug 2106154

Summary: Most overclouds are deployed on SSDs but no discard or fstrim is enabled
Product: Red Hat OpenStack Reporter: Steve Baker <sbaker>
Component: openstack-tripleo-image-elementsAssignee: Alan Bishop <abishop>
Status: CLOSED DUPLICATE QA Contact: nlevinki <nlevinki>
Severity: high Docs Contact:
Priority: medium    
Version: 17.1 (Wallaby)CC: abishop, cinder-bugs, gcharot, geguileo, gfidente, jkreger, mburns
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-26 20:01:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Steve Baker 2022-07-11 21:03:12 UTC
Most overcloud deployments will use SSDs as the primary disk, however the way we build images results in no filesystems mounted with the 'discard' option, and any fstrim.timer systemd unit being disabled by default (fstrim.timer ships in the base distro disabled and with a weekly schedule).

This bug is to request DFG:Storage to recommend any changes to the overcloud images to enable discard/fstrim.

If fstrim should be enabled, on what schedule?

Is this urgent enough to backport to 16.2?

Do we need to consider doing something different for non-SSD deployments? 

This was discovered when switching to LVM thin provisioning for 17.1 RFE #2066349 which really needs discard/fstrim. So advice on what to do in the thin provisioning case is also welcome.

Please assign back to DFG:HardProv and we'll implement the recommendation

Comment 2 Alan Bishop 2022-07-14 18:28:16 UTC
We discussed this in today's cinder squad meeting, and the general consensus is that discard/trim settings on host disks won't affect operation of the cinder service, and the cinder volumes that it serves. It really does come down to what works best for the host OS.

We see the benefits of using LVM with discard/trim on the host, and only the LVM portion affects cinder due to the need to configure a suitable lvm.conf filter so that the host will continue to scan its own disks, but not any attached cinder volumes. The use of discard/trim should be totally transparent.

As far as the fstrim timer is concerned, we (cinder squad) suspect the defaults will probably be fine, and we don't have any experience to suggest further tuning. Perhaps the RHEL platform group might have additional advice?

Comment 3 Giulio Fidente 2022-08-04 16:19:19 UTC
(In reply to Steve Baker from comment #0)
> Most overcloud deployments will use SSDs as the primary disk, however the
> way we build images results in no filesystems mounted with the 'discard'
> option, and any fstrim.timer systemd unit being disabled by default
> (fstrim.timer ships in the base distro disabled and with a weekly schedule).

this looks fine to me, the 'discard' mount option is only for online discard while the recommended approach is to discard blocks in batches, periodically ... hence the only thing we might want to do is enable fstrim.timer

Comment 6 Steve Baker 2022-09-26 20:01:39 UTC
I'm going to close this as a dupe, fstrim will be enabled as part of the switch to thin provisioning.

*** This bug has been marked as a duplicate of bug 2066349 ***