News for hackers. Stuff that matters.
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.
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.

Re:Manual Memory Management in Go using jemalloc by ravenide on Saturday November 07, 2020 @03:35PM (#25018998)
That’s super interesting, I had no idea, but I just meant malloc’ing huge chunks of memory at a time and freeing it all at once.