- From: Brian Pane <brianp@brianp.net>
- Date: Tue, 21 Jun 2011 23:51:17 -0700
- To: Mark Nottingham <mnot@mnot.net>
- Cc: Willy Tarreau <w@1wt.eu>, httpbis Group <ietf-http-wg@w3.org>
On Tue, Jun 21, 2011 at 11:14 PM, Mark Nottingham <mnot@mnot.net> wrote: > On 22/06/2011, at 4:00 PM, Willy Tarreau wrote: [...] > > And for having used haproxy at 7kB for 7-8 years now, the only handful > > situations where it was not enough were due to application bugs that would > > not fit in the 20kB limit either. > > > > So whatever we can do not to encourage ugliness should be done, and I think > > that suggesting 4kB would be much more net-friendly. > > OK, that's a suggestion; what do other folks think? I'm not sure that 4KB is much better than 20KB. Here's my rationale... For a proxy, I tend to think of the per-connection memory usage as: client-side TCP receive window + client-side TCP send window + max header size + server-side TCP receive window + server-side TCP send window In a forward proxy, it's not difficult for the buffer space committed for those four TCP windows to reach 256KB, and at that point the choice of 4KB or 20KB for the header limit will have an impact less than 10% on the total memory footprint. With that said, however, I do think it might make life easier for implementors if the number were slightly less than some multiple of 4KB, so that any necessary bookkeeping information for the buffer (e.g., a length field, or a pointer to the memory slab out of which it was allocated) could be stored in the same memory page as the buffer on systems with 4KB pages. -Brian
Received on Wednesday, 22 June 2011 06:52:04 UTC