Home

aofrewriteincrementalfsync

Aofrewriteincrementalfsync is a Redis configuration option that governs how the system persists the AOF (Append Only File) during the rewrite process. AOF persistence records every write operation, and periodically Redis rewrites the AOF to compact it. The incremental fsync option controls whether the rewritten AOF file is fsynced in small, periodic steps as it is built, rather than waiting until the rewrite is complete.

When incremental fsync is enabled, Redis performs the rewrite by generating a new temporary AOF file and,

Configuration and usage: the behavior is controlled by the directive aof-rewrite-incremental-fsync, typically set to yes or

Considerations: while incremental fsync can reduce rewrite-related pauses, it introduces more frequent disk synchronization work and

as
this
file
grows,
performing
frequent,
small
fsync
operations
on
portions
of
the
file.
This
approach
spreads
disk
I/O
and
durably
commits
more
of
the
rewritten
data
earlier,
which
can
help
limit
latency
spikes
associated
with
a
full,
single,
long
fsync
at
the
end
of
the
rewrite.
If
the
option
is
disabled,
Redis
may
delay
or
batch
fsync
operations
until
the
rewrite
finishes,
potentially
resulting
in
longer
pauses
during
the
rewrite
but
reduced
per-step
disk
activity.
no
in
the
Redis
configuration.
The
exact
default
value
can
depend
on
the
Redis
version
and
platform,
so
users
should
verify
their
current
setup.
In
practice,
enabling
incremental
fsync
is
often
beneficial
for
latency-sensitive
deployments,
but
it
can
increase
disk
I/O
during
the
rewrite.
may
interact
with
the
characteristics
of
the
underlying
filesystem
or
storage.
Operators
should
test
under
representative
workloads
to
determine
the
best
setting
for
stability
and
performance.