Standard allocator memory leak

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Standard allocator memory leak

Denis Kirichenko
Hello. Does anybody can help me to debug std_alloc memory leak. Our
production elixir/erlang application now leak for about 200MB a day.
Recon shows that it is because of std_alloc. But standard allocator
contains a lot of different types of data, and I don't know how to start
debugging this problem. Any ideas? Any ways to inspect the erlang vm?

 > recon_alloc:memory(allocated_types).
[{binary_alloc,173309952},
  {driver_alloc,2392064},
  {eheap_alloc,256114688},
  {ets_alloc,155713536},
  {fix_alloc,7897088},
  {ll_alloc,35913728},
  {sl_alloc,294912},
  {std_alloc,1883799552}, %<<< 1.8G
  {temp_alloc,1179648}]

 > erlang:memory().
[{total,2098938448},
  {processes,99837664},
  {processes_used,99355784},
  {system,1999100784}, %<<< 1.9G
  {atom,842689},
  {atom_used,828419},
  {binary,41062080},
  {code,15612969},
  {ets,88859304}]

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Standard allocator memory leak

Lukas Larsson-8
Hello!

On Mon, Dec 10, 2018 at 1:20 PM Denis Kirichenko <[hidden email]> wrote:
Hello. Does anybody can help me to debug std_alloc memory leak. Our
production elixir/erlang application now leak for about 200MB a day.
Recon shows that it is because of std_alloc. But standard allocator
contains a lot of different types of data, and I don't know how to start
debugging this problem. Any ideas? Any ways to inspect the erlang vm?


You can use the instrument module to get more information, http://erlang.org/doc/man/instrument.html

Note that this module had a major overhaul in OTP-21.

Lukas

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: Standard allocator memory leak

Gerhard Lazu
In reply to this post by Denis Kirichenko
Some resources that helped team RabbitMQ with a similar question:


OTP PR #2046 caught my attention (thanks @essen!) - less helpful, but something worth keeping an eye on.

Hope this helps, Gerhard.

On Mon, Dec 10, 2018 at 12:20 PM Denis Kirichenko <[hidden email]> wrote:
Hello. Does anybody can help me to debug std_alloc memory leak. Our
production elixir/erlang application now leak for about 200MB a day.
Recon shows that it is because of std_alloc. But standard allocator
contains a lot of different types of data, and I don't know how to start
debugging this problem. Any ideas? Any ways to inspect the erlang vm?

 > recon_alloc:memory(allocated_types).
[{binary_alloc,173309952},
  {driver_alloc,2392064},
  {eheap_alloc,256114688},
  {ets_alloc,155713536},
  {fix_alloc,7897088},
  {ll_alloc,35913728},
  {sl_alloc,294912},
  {std_alloc,1883799552}, %<<< 1.8G
  {temp_alloc,1179648}]

 > erlang:memory().
[{total,2098938448},
  {processes,99837664},
  {processes_used,99355784},
  {system,1999100784}, %<<< 1.9G
  {atom,842689},
  {atom_used,828419},
  {binary,41062080},
  {code,15612969},
  {ets,88859304}]

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions