On Tue, Aug 26, 2014 at 07:03:06PM -0700, Jonathan Stone wrote: > Thor, > > The NetBSD TCP stack can't handle 8K payload by page-flipping the payload > and prepending an mbuf for XDR/NFS/TCP/IP headers? Or is the issue the extra > page-mapping for the prepended mbuf?
The issue is allocating the extra page for a milligram of data. It is almost always a lose. Better to choose the MTU so that the whole packet fits neatly in 8192 bytes. It is helpful to understand where MTU 9000 came from: SGI was trying to optimise UDP NFS performance, for NFSv2 with 8K maximum RPC size, on systems that had 16K pages. You can't fit two of that kind of NFS request in a 16K page, so you might as well allocate something a little bigger than 8K but that happens to leave your memory allocator some useful-sized chunks to hand out to other callers. I am a little hazy on the details, but I believe they ended up at MTU 9024 which is 8K + 768 + 64 (leaving a bunch of handy power-of-2 split sizes as residuals: 4096 + 2048 + 1024 + 128 + 64) which just made no sense to anyone else so everyone _else_ picked random sizes around 9000 that happened to work for their hardware. But at the end of the day, if you do not have 16K pages or are not optimizing for 8K NFSv2 requests on UDP, an MTU that fits in 8K is almost always better. Thor