NASA-AMMOS / aerie

A software framework for modeling spacecraft.
https://nasa-ammos.github.io/aerie-docs/
MIT License
73 stars 19 forks source link

Using a libjemalloc Allocator for Better Memory Management #1487

Closed goetzrrGit closed 5 months ago

goetzrrGit commented 5 months ago

Description

We are still noticing a slow climb in the RSS for the sequencing server. @dandelany found this thread on Node about using a different allocator. https://github.com/nodejs/help/issues/1518#issuecomment-991798619

I have implemented the suggested fix and noticed during my 13 expansion runs with a Clippers plan, expansion logic, and dictionaries that the RSS doesn't climb past 3.6GB where as before I was getting past 4GB

dandelany commented 5 months ago

Related issue: #1476

Mythicaeda commented 5 months ago

FYI, alpine does support jemalloc as well: https://pkgs.alpinelinux.org/packages?name=jemalloc&branch=v3.17&repo=main&arch=&maintainer=

Documenting this here as well: I tried using the alpine version and didn't see it loaded when checking the node processes.

goetzrrGit commented 5 months ago

@Mythicaeda I tested this locally and verified that jemalloc is being used. Thank you for figuring it out. I can't approve this PR as it is my own but if you don't have any more updates feel free to approve it.