Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Jan 2014 22:37:24 -0500 (EST)
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        Garrett Wollman <wollman@hergotha.csail.mit.edu>
Cc:        freebsd-net@freebsd.org, nparhar@gmail.com
Subject:   Re: Big physically contiguous mbuf clusters
Message-ID:  <323566728.18752313.1391053044849.JavaMail.root@uoguelph.ca>
In-Reply-To: <201401300322.s0U3Mt3s010029@hergotha.csail.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Garrett Wollman wrote:
> In article <20140129231138$3db6@grapevine.csail.mit.edu>,
> nparhar@gmail.com writes:
> 
> >I think this would be very useful.  For example, a zone_jumbo32
> >would
> >hit a sweet spot -- enough to fit 3 jumbo frames and some loose
> >change
> >for metadata.  I'd like to see us improve our allocators and VM
> >system
> >to work better with larger contiguous allocations, rather than
> >deprecating the larger zones.  It seems backwards to push towards
> >smaller allocation units when installed physical memory in a typical
> >system continues to rise.
> 
> In order to resist fragmentation, you need to be willing to dedicate
> some partition of physical memory to larger allocations.  That's fine
> for a special-purpose device like a switch, but is not so good for a
> general-purpose operating system.  But if you were willing to
> reserve,
> say, 1/64th of physical memory at boot time, make it all
> direct-mapped
> using superpages, and allocate it in fixed-power-of-two-sized chunks,
> you would probably get a performance win.  But the chunks *have* to
> be
> fixed-size, otherwise you are nearly guaranteed to get your arena
> checkerboarded.  I'd consider giving 2 GB on a 128-GB machine for
> that.
> 
> For NFS performance, you'd probably want to be able to take a whole
> chunk, read the desired data into it in a single VOP, then pass the
> whole thing to the socket layer wrapped in an mbuf.
> 
Yep, 1 64K (or 128K soon) mbuf would be nice for read, readdir, write.
(Assuming tcp_output knows how to split it up for net interfaces that
 can't handle TSO segments that large.)

I'm not sure why, but most use 65535 (max IP datagram size) as if_hw_tsomax.
(This guarantees the 64K NFS send gets split up. Doesn't TSO split it up
 into mtu sized segments? If so, I don't see why if_hw_tsomax would be
 a limit?) I'm not knowledgible w.r.t. TSO, so feel free to ignore or
ocrrect this.

rick

> -GAWollman
> _______________________________________________
> freebsd-net@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to
> "freebsd-net-unsubscribe@freebsd.org"
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?323566728.18752313.1391053044849.JavaMail.root>