Much improved sosend_*() functions
rrs at cisco.com
Fri Sep 29 14:47:28 PDT 2006
John-Mark Gurney wrote:
> IMO it's quite a waste of memory the way we have thigns now, though
> w/ TSO it'll change things...
> w/ 512 byte mbuf and a 2k cluster just to store just 1514 bytes of data,
I did not know we were at 512 byte mbufs.. I thought they were
256 bytes.. of course I have not checked recently :-0
> that's only 60% effeciency wrt to memory usage... so, we currently
> waste 40% of memory allocated to mbufs+clusters... Even reducing
> mbufs back to 128 or 256 would be a big help, though IPSEC I believe
> would have issues...
Ahh.. thats probably why they grew and I did not realize it..
Hmm. at 512 bytes it seems to me even more worthwhile to
make everything an EXT.. but thats just me (its not
a rant... at least I don't think so).. just something
I think would be cool and MAY gain some efficency.. I know
it would for SCTP.. not sure about TCP.. and UDP is not so
big of deal since the packet is sent to driver land
after copy anyway.. no need to retransmit ;-)
> Hmmm.. If we switched clusters to 1536 bytes in size, we'd be able to
> fit 8 in 12k (though I guess for 8k page boxes we'd do 16 in 24k)... The
> only issue w/ that would be that a few of the clusters would possibly
> split page boundaries... How much this would effect performance would
> be an interesting question to answer...
That is a good point.. 1536 is a good size for network things...vs
2k... Of course 2 - 2k fits nicely in a page..
Maybe I will make some time shortly to play with this.. change
2k - 1536 and make and reshape mbufs to always have clusters... see
what my box would do then ;-D
NSSTG - Cisco Systems Inc.
803-345-0369 <or> 815-342-5222 (cell)
More information about the freebsd-net