Welcome! Log In Create A New Profile

Advanced

Re: nginx won't honor limit_rate

September 30, 2011 12:16PM
Thanks Maxim Dounin!

I thought that if proxy_max_temp_file_size is set to 0, all the upstream
content have to be buffered in memory, and I make a test and find I'm wrong..

On Fri, Sep 30, 2011 at 11:18 PM, Maxim Dounin <mdounin@mdounin.ru> wrote:

> Hello!
>
> On Fri, Sep 30, 2011 at 10:56:41PM +0800, li zJay wrote:
>
> > hello!
> >
> > If you want nginx to don't touch disk, use
> > >
> > > proxy_max_temp_file_size 0;
> > >
> > > instead. This will still allow in-memory buffering and wouldn't
> > > touch disk.
> > >
> >
> > Because the client bandwidth is usually slow, in this case, tons of
> upstream
> > content will be buffer in memory before sent out to client, and then the
> > swap will be used and the server is going down soon.
>
> The limit on memory usage for proxy buffering is set with
> proxy_buffers directive, 8 * pagesize by default. Nobody stops
> you from setting it even lower if you are memory-constrained.
>
> The "proxy_buffering off;" is needed when you want response to be
> immediately passed to clients once it arrives. It's critical for
> streaming and similar workloads where you can't afford delays.
> But it's not a switch to limit resource consumption. Instead, it
> actually implies less effective resource usage: processing of
> requests without buffering takes more CPU time and may cause
> suboptimal network utilization.
>
> Maxim Dounin
>
> >
> > On Fri, Sep 30, 2011 at 5:18 PM, Maxim Dounin <mdounin@mdounin.ru>
> wrote:
> >
> > > Hello!
> > >
> > > On Fri, Sep 30, 2011 at 04:22:52PM +0800, li zJay wrote:
> > >
> > > > set "proxy_buffering on", the upstream response may touch the disk
> > > > this suffers a lot when nginx is used as a proxy to file download
> > > servers.
> > >
> > > If you want nginx to don't touch disk, use
> > >
> > > proxy_max_temp_file_size 0;
> > >
> > > instead. This will still allow in-memory buffering and wouldn't
> > > touch disk.
> > >
> > > Maxim Dounin
> > >
> > > >
> > > > On Thu, Sep 29, 2011 at 7:31 AM, mojiz <nginx-forum@nginx.us> wrote:
> > > >
> > > > > Thanks Max.
> > > > > It worked!
> > > > >
> > > > > Posted at Nginx Forum:
> > > > > http://forum.nginx.org/read.php?2,215989,215991#msg-215991
> > > > >
> > > > > _______________________________________________
> > > > > nginx mailing list
> > > > > nginx@nginx.org
> > > > > http://mailman.nginx.org/mailman/listinfo/nginx
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > >
> > > > _______________________________________________
> > > > nginx mailing list
> > > > nginx@nginx.org
> > > > http://mailman.nginx.org/mailman/listinfo/nginx
> > >
> > > _______________________________________________
> > > nginx mailing list
> > > nginx@nginx.org
> > > http://mailman.nginx.org/mailman/listinfo/nginx
> > >
> >
> >
> >
> > --
>
> > _______________________________________________
> > nginx mailing list
> > nginx@nginx.org
> > http://mailman.nginx.org/mailman/listinfo/nginx
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>



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

nginx won't honor limit_rate

mojiz September 28, 2011 07:06PM

Re: nginx won't honor limit_rate

Maxim Dounin September 28, 2011 07:24PM

Re: nginx won't honor limit_rate

mojiz September 28, 2011 07:31PM

Re: nginx won't honor limit_rate

lm011111 September 30, 2011 04:24AM

Re: nginx won't honor limit_rate

Maxim Dounin September 30, 2011 05:20AM

Re: nginx won't honor limit_rate

lm011111 September 30, 2011 10:58AM

Re: nginx won't honor limit_rate

Maxim Dounin September 30, 2011 11:20AM

Re: nginx won't honor limit_rate

lm011111 September 30, 2011 12:16PM

Re: nginx won't honor limit_rate

mojiz September 30, 2011 11:13AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 75
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready