On Fri, Mar 13, 2020 at 08:44:59AM +0100, Willy Tarreau wrote:
> I'm seeing that the struct connection has become huge (160 bytes now)

By the way, regarding this, I'm seeing this order of criticity in terms
of structures sizes:

 1) struct fdtab : 64 bytes, cache-line-aligned, shared between threads,
    no room for negociation, the only way to add something is to replace
    something else with an added benefit.
 2) struct tasklet : 48 bytes, shares the first 32 or so with struct task
    (must alias), we don't want it to go beyond a cache line
 3) struct task: 160 bytes already :-(  Must be very carefully arranged
    to group fields used together as close as possible to benefit from
    the appear in the cache line when accessed
 4) struct connection: 160 bytes, many of which are never used. I'd love
    to shrink it down to 128 by moving PPv2 away from it
 5) struct session: 184 bytes, nor optimized, 3 cache lines already,
    could get a bit more love.
 6) struct conn_stream: 40 bytes, OK to grow up to a cache line
 7) struct stream (1 kB) and all others at the same level.

Willy

Reply via email to