Skip to content

Commit

Permalink
transposefs: Only autosave-xfs 1TiB filesystems
Browse files Browse the repository at this point in the history
The change in #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.

First, rework the reprovision threshold to operate in terms of
disk size, which is much easier to explain and debug than
allocation group count.  (Which to be clear, *is* the real problem,
but disk size is a good enough proxy for this)

Then, bump the reprovision threshold to 1TiB.  This is comfortably
about the default OpenShift node root disk sizes, and returns
us to the prior status quo.
  • Loading branch information
cgwalters committed Aug 24, 2023
1 parent 33e40a6 commit c636219
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,13 @@ should_autosave_rootfs() {
echo 0
return
fi
local agcount
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
# 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
# Find rootfs size in KiB
local rootsize
local reprovisionsize
rootsize=$(($(stat -f -c '%b * %s ${root_part} 1024' /)))
reprovisionsize=$((1024**3))
if [ "$rootsize" -lt "$reprovisionsize" ]; then
echo "Filesystem size $rootsize KiB is less than threshold $reprovisionsize KiB; skipping" >&2
echo 0
return
fi
Expand Down

0 comments on commit c636219

Please sign in to comment.