Welcome! Log In Create A New Profile

Advanced

Re: reverse proxy and too many temp files

Ryan Malayter
October 28, 2010 12:34AM
On Wed, Oct 27, 2010 at 4:16 PM, roadfox <nginx-forum@nginx.us> wrote:
> hi
>
> we are using nginx as a reverse proxy in front of some webservers with
> media files.
> evrerithing works great beside when we start nginx new with an empty
> cache.
>
> in this situation allot of files in proxy_temp_path are create consuming
> quite fast all our diskspace, in the same time proxy_cache_path is only
> very slowly populated.
>
> i see two parameters who might help:
> proxy_cache_use_stale
> proxy_max_temp_file_size
>
> a quick test with *use_stale was not succesfull, but maybe something
> else was wrong
> and for proxy_max_temp_file_size=0 i'm not shure if it is the right
> thing todo
>
> what we would like to achieve is to uses as much of the diskspace for
> caching. but on a restart with clean cache, not filling up the temp
> folder which does not count to proxy_cache_path max_size.
>
> or should we just reduce the workers (16) to provent from having to many
> workers creating the same temp file for the same origin file?

You probably need to increase the number and/or size of proxy_buffers
and perhaps your gzip_buffers. The defaults are way too small and
trade low memory usage for disk I/O (which is a really bad trade-off
most of the time). I have "proxy_buffers 16 32k;" and don't see temp
responses on disk at all with my applications (some of which send up
to 512KB uncompressed pages.
--
RPM

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

reverse proxy and too many temp files

roadfox October 27, 2010 05:16PM

Re: reverse proxy and too many temp files

Ryan Malayter October 28, 2010 12:34AM

Re: reverse proxy and too many temp files

roadfox October 28, 2010 01:27AM

Re: reverse proxy and too many temp files

SplitIce October 28, 2010 02:46AM

Re: reverse proxy and too many temp files

Maxim Dounin October 28, 2010 04:06AM

Re: reverse proxy and too many temp files

roadfox October 28, 2010 07:44AM

Re: reverse proxy and too many temp files

Splitice October 28, 2010 11:38AM

Re: reverse proxy and too many temp files

Maxim Dounin October 28, 2010 12:20PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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