<div dir="ltr">Hello,<div>I recently came across a modified version of zlib with code contributed by Intel [1] that makes use of modern CPU instructions to increase performance. In testing, the performance gains seemed substantial, however when I tried to use this version with nginx, the following alert types appeared in the error_log on gzip requests:</div>
<div><br></div><div>2014/07/30 05:20:29 [alert] 22285#0: *739837 gzip filter failed to use preallocated memory: 65536 of 65520 while sending to client<br></div><div>2014/07/30 05:40:42 [alert] 29462#0: *230460 gzip filter failed to use preallocated memory: 1040 of 4112<br>
</div><div><br></div><div>It appears nginx is pre-allocating a buffer based on the original zlib memory usage patterns, however the Intel optimized version has slightly higher memory requirements due to padding for SSE functions etc.</div>
<div><br></div><div>Is there a chance this version could be supported by nginx, or a configuration option made available to control the allocation size?</div><div><br></div><div>Thanks.</div><div><br></div><div>[1] <a href="https://github.com/jtkukunas/zlib">https://github.com/jtkukunas/zlib</a><br>
</div><div><br></div></div>