Welcome! Log In Create A New Profile

Advanced

Nginx 1.12.1 Memory Consumption

Matthew Smith
March 14, 2018 01:08PM
Hello,

I have encountered what I consider to be an interesting behavior. We have
Nginx 1.12.1 configured to do SSL termination as well as reverse proxy.
Whenever there is a traffic spike (300 req/s > 1000 req/s, 3k active
connections > 20k active connections), there is a corresponding spike in
Nginx memory consumption. In this case 500M > 8G across 10 worker
processes. What is interesting is that Nginx never seems to release this
memory after the traffic returns to normal. Is this expected? What is Nginx
using this memory for? Is there a configuration that will rotate the
workers based on some metric in order to return memory to the system?

Requests per second:
https://www.dropbox.com/s/cl2yqdxgqk2fn89/Screenshot%202018-03-14%2012.38.10.png?dl=0

Active connections:
https://www.dropbox.com/s/s3j4oux77op3svo/Screenshot%202018-03-14%2012.44.14.png?dl=0

Total Nginx memory usage:
https://www.dropbox.com/s/ihp5zxky2mgd2hr/Screenshot%202018-03-14%2012.44.43.png?dl=0

Thanks,

Matt
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx 1.12.1 Memory Consumption

Matthew Smith March 14, 2018 01:08PM

Re: Nginx 1.12.1 Memory Consumption

Maxim Dounin March 14, 2018 04:56PM

Re: Nginx 1.12.1 Memory Consumption

pbooth March 15, 2018 01:08PM

Re: Nginx 1.12.1 Memory Consumption

Matthew Smith March 19, 2018 10:40AM

Re: Nginx 1.12.1 Memory Consumption

Maxim Konovalov March 19, 2018 11:00AM

Re: Nginx 1.12.1 Memory Consumption

pbooth March 19, 2018 01:14PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 161
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