From e3f1d5c4d190931e99f812ecdce600416fdba19d Mon Sep 17 00:00:00 2001 From: felipe stival Date: Tue, 24 Feb 2026 13:59:39 -0300 Subject: [PATCH] Use write_concurrency: :auto for default ETS storage On my benchmarks, provides a 15% improvement. It's generally recommended: >The auto alternative for the write_concurrency option is similar >to the true option but automatically adjusts the synchronization >granularity during runtime depending on how the table is used. >This is the recommended write_concurrency option when using >Erlang/OTP 25 and above as it performs well in most scenarios. --- lib/peep/storage/ets.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/peep/storage/ets.ex b/lib/peep/storage/ets.ex index 5a499ab..8bfbf28 100644 --- a/lib/peep/storage/ets.ex +++ b/lib/peep/storage/ets.ex @@ -21,7 +21,7 @@ defmodule Peep.Storage.ETS do # more expensive. The goal is to ruthlessly optimize writes, even at # the cost of read performance. read_concurrency: false, - write_concurrency: true, + write_concurrency: :auto, decentralized_counters: true ]