[PATCH 0 of 2] reduce memory footprint for long-lived requests

Maxim Dounin mdounin at mdounin.ru
Fri Sep 9 10:32:41 UTC 2011


The following 2 patches address the issue seen with long lived requests: 
they tend to consume lots of memory over time if chunked encoding is used, 
and the memory is only freed after request termination.

First patch introduce buffers reuse in chunked filter.  It mostly resolves
the problem, though there is still small "leak" related to chain links 
(ngx_chain_t structures, 2 pointers) not always being reused.

Second patch introduce proper reuse of chain links, though it requires 
API change in ngx_chain_update_chains() function.  We may introduce
another function to preserve API, but I'm not really sure we want to.

Maxim Dounin

More information about the nginx-devel mailing list