Nginx Windows High Traffic issues

Maxim Dounin mdounin at
Mon Jun 30 17:53:33 UTC 2014


On Sat, Jun 28, 2014 at 12:38:12AM -0400, c0nw0nk wrote:

> Latest picture
> Everything utilizing the read's and writes is nginx and when i set the
> following buffers i get massive spikes like that.
> location ~ \.mp4$ {
> mp4;
> mp4_buffer_size 9000m;
> mp4_max_buffer_size 9000m;
> }

Note that when using mp4 module, you should not set 
mp4_buffer_size too high.  It's initial size of a buffer used to 
read mp4 files, and if a value specified is bigger than size of 
the moov atom in an mp4 file, reading extra bytes will be 
meaningless.  It is generally recommended to set it to something 
like 512k (the default) or slightly larger (1m, 2m).  Larger 
values make sense only if most of your mp4 files have huge moov 

Note well that if you use mp4 pseudo streaming, you should make 
sure that mp4 files are correctly prepared - i.e., with moov atom 
placed before mdat.  While nginx will be able to work with files 
with moov atom at the end, it won't be able to do this 

Maxim Dounin

More information about the nginx mailing list