r391 - trunk/varnish-cache/bin/varnishd

Poul-Henning Kamp phk at phk.freebsd.dk
Mon Jul 10 10:01:30 CEST 2006


In message <20060710075405.379831EC382 at projects.linpro.no>, phk at projects.linpro
.no writes:

>Take the vbe_conn (backend connection) structure out of the closet.

This is the beginning of a bit of remodelling.

The basic idea is that we have

	N(sessions) > N(worker) >> N(backend connections)

And therefore it makes sense to shuffle memory allocations as far right
in that picture as possible.

The other part is that I want to reduce the number of memory allocations
a little bit further by allocating compound objects wherever possible.

This means that struct vbe_conn will grow a struct http and a receive
buffer for talking to the backend.

Along the same lines, the uio array and space for generating headers
will move (a bit further) into the worker thread.

It will look pretty drastic in the commits, but it is pretty simple
under all the noise.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



More information about the varnish-commit mailing list