17 bookmarks. First posted by floehopper december 2017.
Multithreaded Ruby programs may be consuming 2 to 4 times the amount of memory that they really need, due to fragmentation caused by per-thread memory arenas in malloc. To fix this, you can reduce the maximum number of arenas by setting the MALLOC_ARENA_MAX environment variable or by switching to an allocator with better performance, such as jemalloc.ruby rubyonrails optimization memory gc reference articles performance threads
december 2017 by oscar-lopez