Welcome! Log In Create A New Profile

Advanced

Re: Resident memory not released

August 05, 2019 07:12AM
I guess you are right. The main reason I want to scale on memory rather than number of connections, is that we wouldn't have to calculate how many connections a node can handle. Eg, if we change the memory size of each node, we also have to update the automatic scaling metric, or lets say there is a new version of nginx that uses less memory per connection, then we would have to re-calibrate the scaling.

I did read up a bit on the MALLOC_CHECK_ variable, and it sound like that should not be used in production, as it reduces the overall performance.

I've also tried to compile jemalloc and load that via the LD_PRELOAD environment variable. That seems to work pretty good, memory is released/reclaimed as I would expect, but only when running nginx as root. Not sure why it doesn't work when starting nginx as an other user though.

But I think I'll do as you suggested and scale it on number of connections for now. I'm a bit out of my depth here :)


Peter Booth via nginx Wrote:
-------------------------------------------------------
> 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”.
Subject Author Posted

Resident memory not released

fredr July 29, 2019 11:25AM

Re: Resident memory not released

Maxim Dounin July 29, 2019 01:04PM

Re: Resident memory not released

aledbf July 29, 2019 02:52PM

Re: Resident memory not released

Maxim Dounin July 29, 2019 03:12PM

Re: Resident memory not released

fredr July 30, 2019 10:46AM

Re: Resident memory not released

Peter Booth via nginx August 02, 2019 01:58AM

Re: Resident memory not released

fredr August 05, 2019 07:12AM

Re: Resident memory not released

aledbf August 05, 2019 12:37PM

Re: Resident memory not released

fredr August 06, 2019 03:52AM

Re: Resident memory not released

aledbf August 06, 2019 01:08PM

RE: Resident memory not released

R, Rajkumar (Raj) August 05, 2019 08:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 288
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready