Memory usage

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

Memory usage

Sergey Safarov
Hello
On server installed program compiled using erlang 20.3.4
Using ps utility I can see that this program eat server memory.
Program use about 50G of memory.

How I can investigate what is eat memory?

[root@node0 ~]# ps -F --pid 3947
UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
root      3947  3638  0 22520660 56920600 6 Aug09 pts/0 17:19:16 /opt/kazoo/erts-8.3/bin/beam.smp -Bd -pc unicode -K true -A 100 -W w -- -root /opt/kazoo -progname usr/local
[root@node0 ~]# 


Reply | Threaded
Open this post in threaded view
|

Re: Memory usage

Gerhard Lazu

On Tue, Oct 29, 2019 at 10:47 AM Sergey Safarov <[hidden email]> wrote:
Hello
On server installed program compiled using erlang 20.3.4
Using ps utility I can see that this program eat server memory.
Program use about 50G of memory.

How I can investigate what is eat memory?

[root@node0 ~]# ps -F --pid 3947
UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
root      3947  3638  0 22520660 56920600 6 Aug09 pts/0 17:19:16 /opt/kazoo/erts-8.3/bin/beam.smp -Bd -pc unicode -K true -A 100 -W w -- -root /opt/kazoo -progname usr/local
[root@node0 ~]# 


Reply | Threaded
Open this post in threaded view
|

Re: Memory usage

Vladimir Ralev-2
In reply to this post by Sergey Safarov
Hi,

This is something I used that has worked for me without installing
additional software, it's like poor mans recon:

https://www.mail-archive.com/user@.../msg29365.html

Replace message_queue_len with total_heap_size to check the heap as
well. It lists all processes by memory consumption, sorts them and
looks at the top offender.

In kazoo the biggest memory hog I've seen is the media file cache. If
you have a lot of TTS I guess it's possible that it will get to 50GB
at some point, but that's really a lot.

You would see it in the contents here
https://github.com/2600hz/kazoo/blob/master/core/kazoo_media/src/kz_media_tts_cache.erl

If you can't figure it out I would volunteer to check it out for you via remsh.


On Tue, Oct 29, 2019 at 12:47 PM Sergey Safarov <[hidden email]> wrote:

>
> Hello
> On server installed program compiled using erlang 20.3.4
> Using ps utility I can see that this program eat server memory.
> Program use about 50G of memory.
>
> How I can investigate what is eat memory?
>
> [root@node0 ~]# ps -F --pid 3947
> UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
> root      3947  3638  0 22520660 56920600 6 Aug09 pts/0 17:19:16 /opt/kazoo/erts-8.3/bin/beam.smp -Bd -pc unicode -K true -A 100 -W w -- -root /opt/kazoo -progname usr/local
> [root@node0 ~]#
>
>