deadtrickster
Horde memory usage
Hello,
We are using Horde to have “about one” process for a key in a cluster. We poll external service and each run we ask Horde to start a process with a key. If we already saw the key, Horde reports already_started as expected. However, we observe that internal merkle_map grows linearly with startup attempts.
crdt_size = fn ->
pid = Process.whereis(Elixir.MyHordeSupervisor.Crdt)
state = :sys.get_state(pid)
map_size(Map.get(state, :merkle_map).map)
end
iex(9)> crdt_size.()
10077
iex(11)> crdt_size.()
10077
iex(12)> Enum.each(1..10000, fn _ -> start_constant_queue.() end)
:ok
iex(13)> crdt_size.()
20079
iex(15)> Enum.each(1..10000, fn _ -> start_constant_queue.() end)
:ok
iex(16)> crdt_size.()
30081
depending on number of keys and refresh rate memory limit hit pretty quickly.
Elixir.MyHordeSupervisor.Crdt process memory size will be hundreds of megabytes.
While writing code we following the docs on hexdocs.
Any help would be appreciated. Thanks!
Most Liked
deadtrickster
Popular in Questions
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
To my knowledge, put_in, Map.update etc. all have the one limitation of not automatically creating intermediate keys when needed (for exa...
New
Hi everyone!
I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
Other popular topics
Hi guys, i’m new in the Elixir world, and i have to say, that i love it!
i’m having some problem to understand anonymous functions with ...
New
I would like to know what is the best IDE for elixir development?
New
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
What learn first? Rust or Elixir
Hi Elixir community!
I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









