Use write_concurrency: :auto for default ETS storage#68
Conversation
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.
|
TIL that Official benchmarks: https://www.erlang.org/bench/ets_bench_result_lock_config That page shows a relatively narrow performance gap on read-only workloads that widens and widens as write percentage increases. Seeing as Peep is very write heavy, I guess this change is no-brainer. Would it be possible for you to share your benchmark code? I do believe the results you're seeing, but I am slowly trying to collect a little suite of Peep benchmarks. |
|
I think that @v0idpwn is using similar test suite as I am - Supavisor. I have some benchmark files written for testing small things, but these do not test Peep in "real life" scenarios under heavy load. Maybe there could be something done similar to that what could simulate such heavy load. |
|
Gotcha. I'll probably set up a little benchmarking suite inside/alongside Peep 'someday'. In the meantime, I also have real software using Peep 'at scale' where big performance wins can be easily seen. |
On my benchmarks, provides a 15% improvement. It's generally
recommended: