hammer icon indicating copy to clipboard operation
hammer copied to clipboard

performance degradation over time with ETS backend

Open ruslandoga opened this issue 7 months ago • 11 comments

Describe the bug I've been benchmarking hot paths in https://github.com/plausible/analytics and noticed that ExHammer check here becomes slower over time, from 11us in the beginning of k6 benchmark (it hits the same site every time, so :hammer_ets_buckets has a single key throughout the benchmark) to over 100ms in the end. And in some requests (when user-agents are cached) that check_rate call becomes the largest slice in the request flamegraph

Screenshot 2023-11-22 at 19 28 43

** Provide the following details

  • Elixir version (elixir -v): 1.15.7
  • Erlang version (erl -v): 26.1.2
  • Operating system: mac sonoma

ruslandoga avatar Nov 22 '23 11:11 ruslandoga