buffer chains optimisation

Igor Sysoev is at rambler-co.ru
Fri Apr 25 21:53:41 MSD 2008

On Fri, Apr 25, 2008 at 07:17:30PM +0200, Chavelle Vincent wrote:

> I read the guide about the Nginx module development and I don't find any
> description about how buffer chains are processed. For example, I send a
> file line by line and I would like to know if it's optimized to create
> one buffer (ngx_buf_t) and one chain (ngx_chain_t) for each line or to
> concatenate entire document and send it with only one buffer/chain.

nginx does some memory/file pointer gathering before passing data to
writev()/sendfile(), i.e, two neighbour memory/file blocks became one.
But nginx does not copy data to concatenate them.

Igor Sysoev

More information about the nginx mailing list