Memory consumption of ningx

Anton Yuzhaninov citrin at
Tue Oct 30 10:15:15 UTC 2012

On 10/29/12 21:13, peschuster wrote:
> However, I am having problems with the memory consumption of nginx:
> When I perform 10,000 requests with 20 conn/s and 2 requests/conn (using
> httperf - 1), memory used by nginx grows to about 40 MB.
> When I repeat this benchmark, the used memory grows from 40 to 80 MB.

1. Do you use 3rd party modules?
2. This request served by nginx (e. g. static files) or proxied to some backend?
3. Memory usage depends on used features: SSL, SSI, gzip, limt rate, geo module, 
e. t. c.

If gzip is used for static files, better to pre-compress them, and use 

Also yo save memory use 1 worker and set reasonable small limit on connections:

   worker_processes  1;

   events {
     worker_connections 512;

  Anton Yuzhaninov

More information about the nginx mailing list