Skip to content

Commit

Permalink
transposefs: Only autosave-xfs for much larger filesystems
Browse files Browse the repository at this point in the history
The change in coreos#2320
has been very problematic for OpenShift because our default node
configuration is *always* over the threshold, and that causes
significant latency on instance provisioning.

Experimentally bumping to 400 allocation groups, which is about 700GiB.
This is comfortably about the default OpenShift node root disk sizes,
and returns us to the prior status quo.

While we're here, rework the logging a bit so that we *always*
log the `agcount` for debugging purposes.
  • Loading branch information
cgwalters committed Aug 24, 2023
1 parent 33e40a6 commit 223d0f2
Showing 1 changed file with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,20 @@ should_autosave_rootfs() {
return
fi
local agcount
# We want to run xfs_info on the unmounted filesystem, because actually just
# even mounting an XFS filesystem that has grown an excessive number of allocation groups
# can be very slow.
eval $(xfs_info "${root_part}" | grep -o 'agcount=[0-9]*')
# Semi-arbitrarily chosen: this is roughly ~64G currently (based on initial
# ag sizing at build time) which seems like a good rootfs size at which to
# This is roughly ~700GiB currently (based on initial ag sizing at build time) which
# seems like a good rootfs size at which to
# discriminate between "throwaway/short-lived systems" and "long-running
# workload systems". It's not like XFS performance is way worse at 128.
if [ "$agcount" -lt 128 ]; then
echo "Filesystem agcount is $agcount; skipping" >&2
# workload systems". Specifically for e.g. OpenShift, it's below the default node
# sizes.
local threshold
threshold=400
echo "${root_part} agcount=$agcount" >&2
if [ "$agcount" -lt "${threshold}" ]; then
echo "agcount=$agcount is lower than threshold=${threshold}"
echo 0
return
fi
Expand Down

0 comments on commit 223d0f2

Please sign in to comment.