persistent_term to replace ETS for caching
Sun Dec 6 11:41:22 CET 2020
It has the potential to trigger Global GC, and can affect responsiveness as
per the docs.
On Sun, Dec 6, 2020 at 5:16 AM Frank Muller <frank.muller.erl@REDACTED>
> Hi guys,
> At work, we cache about 5.3 million entries in ETS. The system works
> perfectly, no issue so far (many years).
> During a brainstorming session, a colleague suggested to switch to
> persistent_term instead to avoid ETS term copying.
> Pretty simple: we check if the Key exists in persistent_term. If yes, we
> are done. If not, we get it from ETS, move it to persistent_term and send
> it back to the caller.
> Question: is there any limitation(s) on persistent_term usage? Stated
> otherwise, can we create 5.3 million persistent_term <K,V>?
> Any suggestion/idea/thought is very welcome.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions