[bisq-network/bisq] Bisq using up too much memory on Linux even after closing (#3918)

Stan notifications at github.com
Mon Mar 16 17:23:18 UTC 2020

There is a glibc setting on Linux that can be used to define a hard limit of the number of arenas -- thread safe memory pools used by malloc() -- that can be created.  The trade off for using this is more thread contention among Bisq's allocating threads versus less memory usage.

    export MALLOC_ARENA_MAX=4  

Using this on my Ubuntu 18 laptop reduces the RES memory by ~300 mb, and VIRT by ~3.7 GB.

In addition, configuring the jvm's starting and max heap size reduces both RES and VIRT by another ~200 mb.

    export JAVA_OPTS="-Xms820m -Xmx820m"

Used together

    export MALLOC_ARENA_MAX=4		
    export JAVA_OPTS="-Xms820m -Xmx820m"

RES memory is reduced by ~500 mb, and VIRT memory by ~3.9 GB.

I will test these on VMs next (Arch Linux, Debian, Fedora).

These settings, any of which disable dynamic adjustment of glibc's mmap threshold,  save another 100 mb in RES and VIRT, but I haven't experimented enough to suggest anyone else try them yet.

    export MALLOC_MMAP_THRESHOLD_=131072
    export MALLOC_TRIM_THRESHOLD_=131072
    export MALLOC_TOP_PAD_=131072
    export MALLOC_MMAP_MAX_=65536

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200316/5ba16c84/attachment.html>

More information about the bisq-github mailing list