<div dir="ltr">Hello,<div><br></div><div>The host has 30G total memory. Nginx usage is being measured by summing the Pss values from /proc/$pid/smaps for all worker processes.</div><div><br></div><div>Do you have any suggestions for differentiating between the two issues that might prevent memory from being returned to the system?</div><div><br></div><div>Thanks!</div><br><div class="gmail_quote"><div dir="ltr">On Thu, Mar 15, 2018 at 1:06 PM Peter Booth <<a href="mailto:peter_booth@me.com" target="_blank">peter_booth@me.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space">Two questions: <div><br></div><div>1. how are you measuring memory consumption?</div><div>2. How much physical memory do you have on your host?<br><div><br></div><div><br><div>Assuming that you are running on Linux, can you use <font face="Courier New">pidstat -r -t -u -v -w -C “nginx”</font></div><div>to confirm the process’s memory consumption, </div><div><br></div><div>and <font face="Courier New">cat /var/meminfo</font> to view a detailed description of how memory is being used onto entire host.</div><div><br><div><br><blockquote type="cite"></blockquote></div></div></div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><div><div><div><blockquote type="cite"><div>On Mar 14, 2018, at 1:05 PM, Matthew Smith <<a href="mailto:matthew.smith@acquia.com" target="_blank">matthew.smith@acquia.com</a>> wrote:</div><br class="m_-4483011934904682888m_-596499058954473061Apple-interchange-newline"></blockquote></div></div></div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><div><div><div><blockquote type="cite"><div><div dir="ltr">Hello,<div><br></div><div>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?</div><div><br></div><div>Requests per second:</div><div><a href="https://www.dropbox.com/s/cl2yqdxgqk2fn89/Screenshot%202018-03-14%2012.38.10.png?dl=0" target="_blank">https://www.dropbox.com/s/cl2yqdxgqk2fn89/Screenshot%202018-03-14%2012.38.10.png?dl=0</a><br></div><div><br></div><div>Active connections:</div><div><a href="https://www.dropbox.com/s/s3j4oux77op3svo/Screenshot%202018-03-14%2012.44.14.png?dl=0" target="_blank">https://www.dropbox.com/s/s3j4oux77op3svo/Screenshot%202018-03-14%2012.44.14.png?dl=0</a><br></div><div><br></div><div>Total Nginx memory usage:</div><div><a href="https://www.dropbox.com/s/ihp5zxky2mgd2hr/Screenshot%202018-03-14%2012.44.43.png?dl=0" target="_blank">https://www.dropbox.com/s/ihp5zxky2mgd2hr/Screenshot%202018-03-14%2012.44.43.png?dl=0</a><br></div><div><br></div><div>Thanks,</div><div><br></div><div>Matt</div></div></div></blockquote></div></div></div></div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><div><div><div><blockquote type="cite"><div>
_______________________________________________<br>nginx mailing list<br><a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br><a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a></div></blockquote></div></div></div></div></div>_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a></blockquote></div></div>