Re:Manual Memory Management in Go using jemalloc
by ravenide on Friday November 06, 2020 @09:50PM
(#25012902)
Just wait until they figure out how to use arena/stack-based memory.
[ Parent
| on HN ]
Re:Manual Memory Management in Go using jemalloc
by user5994461 on Saturday November 07, 2020 @12:58PM
(#25016866)
Actually, the implementation of arenas is broken in glibc malloc() when running on multicore systems.
I have been debugging that problem for some time. The charts in the article are quite similar to the ones I got when I initially came across the problem.
Wonder how many threads does their process have? and how many cores on the machine?
There are environment variables that can adjust the behavior of malloc. They should try setting MALLOC_ARENA_MAX=4 and see if the memory usage goes down.