Resident memory not released
peter_booth at me.com
Fri Aug 2 05:57:01 UTC 2019
I’m wondering if you are overthinking this. You said that the memory was reused when the workload increased again. Linux memory management is unintuitive. What would happen if you used a different metric, say # active connections, as your autoscaling metric? It sounds like this would behave “better”.
> On 29 Jul 2019, at 3:10 PM, Maxim Dounin <mdounin at mdounin.ru> wrote:
> On Mon, Jul 29, 2019 at 02:52:47PM -0400, aledbf wrote:
>>> on your system allocator and its settings.
>> Do you have a suggestion to enable this behavior (release of memory) using a
>> particular allocator or setting?
> On FreeBSD and/or on any system with jemalloc(), I would expect
> memory to be returned to the OS more or less effectively.
> On Linux with standard glibc allocator, consider tuning
> MALLOC_MMAP_THRESHOLD_ and MALLOC_TRIM_THRESHOLD_ environment
> variables, as documented here:
> Note that you may need to use the "env" directive to
> make sure these are passed to nginx worker processes as well.
> Maxim Dounin
> nginx mailing list
> nginx at nginx.org
More information about the nginx