389ds / 389-ds-base

The enterprise-class Open Source LDAP server for Linux
https://www.port389.org/
Other
200 stars 82 forks source link

Constant RAM consumption #6249

Open vudex opened 2 days ago

vudex commented 2 days ago

Issue Description We are experiencing problems with 389 Directory Server (389-ds) within the FreeIPA package where it consistently consumes memory over time. As a result, we have to regularly (monthly) restart the service to avoid undesirable outcomes. How should we go about investigating these memory consumption issues with 389-ds?

Does Debugging Memory Growth/Invalid Access with Valgrind paragraph here still holds?

RAM graph (node_exporter) image

Memory graph (process_exporter) image

Package Version and Platform:

Additional context We are noticing this behavior not only with version mentione above, but also with CentOS 8 one we are using:

vashirov commented 2 days ago

In my experience, Valgrind makes the server 10-20x slower, when AddressSanitizer only 3-5x, so I recommend to use it instead https://github.com/389ds/389-ds-base/blob/b47cbe04f8edcf0ad1d903ca2a0011c2a5121b36/wrappers/systemd.template.service.custom.conf.in#L88 or jemalloc heap profiling https://github.com/389ds/389-ds-base/blob/b47cbe04f8edcf0ad1d903ca2a0011c2a5121b36/wrappers/systemd.template.service.custom.conf.in#L53

If it's a production system, jemalloc heap profiling is the least intrusive option, but it might be less precise. Make sure you install debuginfo packages for 389-ds-base, 389-ds-base-libs and freeipa-server (as it contains plugins for 389-ds).