I went into this expecting Redis's appendfsync everysec setting to lose roughly a second of writes if the process died mid-stream, because that is what the documentation says…

I went into this expecting Redis's appendfsync everysec setting to lose roughly a second of writes if the process died mid-stream, because that is what the documentation says to expect. Across three separate crash tests, it lost nothing. Figuring out why took me somewhere more interesting than the number itself: a close look at what "the process died" actually means, and how different that is from what the docs are describing. That sent me down a longer road than one setting.

I ended up measuring what it costs to turn Redis's append-only log on while an instance is already serving writes, what the fsync policy you pick does to it under load, and what each option actually gets you back when something goes wrong. I ran Redis 7.0.15 (the version Ubuntu 24.04 ships) on a single machine, in its own data directory, talking only to my own benchmark clients. Nothing here touched a cluster or a cloud service.

What durability costs while nothing is going wrong First, the boring case: a client doing synchronous SET calls, one at a time, against three persistence modes, each one run three times for five seconds: mode ops/sec (fastest run) avg latency no persistence 14,791 0.067 ms appendfsync everysec 14,148 0.070 ms appendfsync always 4,295 0.232 ms everysec is effectively free, which matches what the Redis docs promise: the write still goes into a buffer, and a background thread fsyncs it once a second regardless of how many commands happened in between.

always fsyncs on every single write, and single-client throughput fell to about a third of baseline. That is the number people usually quote, and it held up. What surprised me was what happened when I stopped using one client and used a lot of them.

I ran redis-benchmark at four concurrency levels against the same two fsync modes: clients everysec (p50) always (p50) 1 23,742 rps (0.039 ms) 4,743 rps (0.207 ms) 10 142,045 rps (0.047 ms) 24,808 rps (0.383 ms) 50 130,890 rps (0.207 ms) 86,207 rps (0.519 ms) 200 112,740 rps (0.903 ms) 131,926 rps (1.239 ms) At one client, always is roughly a fifth of everysec's throughput. By 200 clients, always is not just competitive, it is slightly ahead. Redis batches concurrent writers behind a single fsync call when it can, so the fixed cost of calling fsync() gets paid once per batch rather than once per command.

Source disclosure

This is a source-linked briefing. Read the original report from Dev Community .