Welcome! Log In Create A New Profile

Advanced

Re: High memory consumption when proxying to a Comet server

Maxim Dounin
April 11, 2010 10:00PM
Hello!

On Sun, Apr 11, 2010 at 10:08:26PM -0300, Rogério Schneider wrote:

> Maxim, thanks.
>
> I have tried to reduce memory usage by reducing the default values for:
> proxy_buffers
> from "8 4k" to "2 4k".
>
> With this one would expect the memory usage to be 4 times lower, but
> that was not what I saw.
> I saw the memory usage stay in the same growth step.

No, changing 8 buffers to 2 buffers doesn't mean memory usage will
be 4 times less. 1) this isn't the only allocations made, and 2)
not all requests allocate all proxy buffers, only ones with big
responses and slow clients. But see below.

> May I mention that for the fact I am using Comet, I turned proxy buffering off?
> proxy_buffering off;
> I think this is important to note and it can explain why tuning the
> proxy buffers down did not lower the memory consumption.

With proxy_buffering off; setting proxy_buffers indeed doesn't
matter at all.

Next candidates is gzip_buffers (only matters if you are using
gzip, up to 32 * 4k by default; and keep in mind that about 200k
or so will be allocated per request anyway with gzip enabled).

Remaining ones are output_buffers and fastcgi_buffers, these
shouldn't matter in your case anyway.

> Could I debug Nginx procs to see where the memory is being allocated
> and for what purpose?
> How could I debug it? Do you have some guideline?

You may switch on debug log, it will be possible to trace big
allocations there. See here:

http://nginx.org/en/docs/debugging_log.html

Maxim Dounin

p.s. Please do not top-post. Thank you.

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

High memory consumption when proxying to a Comet server

Rogério Schneider April 11, 2010 08:20PM

Re: High memory consumption when proxying to a Comet server

Maxim Dounin April 11, 2010 08:52PM

Re: High memory consumption when proxying to a Comet server

Rogério Schneider April 11, 2010 09:12PM

Re: High memory consumption when proxying to a Comet server

Maxim Dounin April 11, 2010 10:00PM

Re: High memory consumption when proxying to a Comet server

Rogério Schneider April 11, 2010 11:46PM

Re: High memory consumption when proxying to a Comet server

Maxim Dounin April 12, 2010 03:56PM

Re: High memory consumption when proxying to a Comet server

Rogério Schneider April 12, 2010 04:22PM

Re: High memory consumption when proxying to a Comet server

Maxim Dounin April 12, 2010 05:32PM

Re: High memory consumption when proxying to a Comet server

Rogério Schneider April 15, 2010 03:48AM

Re: High memory consumption when proxying to a Comet server

zanettea May 28, 2010 09:54AM

Re: High memory consumption when proxying to a Comet server

Rogério Schneider June 07, 2010 10:20PM

Re: High memory consumption when proxying to a Comet server

zanettea June 08, 2010 03:13AM

Re: High memory consumption when proxying to a Comet server

Maxim Dounin June 08, 2010 04:38AM

Re: High memory consumption when proxying to a Comet server

Rogério Schneider June 08, 2010 10:50AM

Re: High memory consumption when proxying to a Comet server

Rogério Schneider June 08, 2010 10:58AM

Re: High memory consumption when proxying to a Comet server

Igor Sysoev June 08, 2010 11:10AM

Re: High memory consumption when proxying to a Comet server

Rogério Schneider June 08, 2010 08:02PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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