Page size for mbufs

Gerrit Nagelhout gnagelhout at sandvine.com
Tue Dec 2 14:01:01 PST 2003


Hi,

As part of some performance tuning for a bridging-like application, I am
looking at the page sizes being used for mbufs (headers & clusters).  As far
as I can tell, it is currently using standard 4K pages for this.  In this
application (Running on 2.8 Ghz Xeon), there seems to be large pipeline
stall whenever new mbufs are being accessed.  The number of active mbufs in
the system is about 4096, which works out to 2048 pages for the clusters
alone.  Since there are only 64 TLB entries in the xeon, I suspect that TLB
thrashing will have a severe performance impact.  In order to try and get
around this, I'd like to try and change the page size for the Mbufs.  Does
anybody have any ideas on the best/easiest way to try this out, and figure
out what the performance impact is?
I know that the mbufs are allocated out of the mb_map, which is created by
kmem_suballoc.  I have also noticed some 4M page support in pmap.c, but I'm
not sure how to tie the two together.  Any suggestions?
Thanks,

Gerrit Nagelhout


More information about the freebsd-hackers mailing list