Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Sep 2006 17:46:40 -0400
From:      Randall Stewart <rrs@cisco.com>
To:        John-Mark Gurney <gurney_j@resnet.uoregon.edu>
Cc:        freebsd-net@freebsd.org, Mike Silbersack <silby@silby.com>, freebsd-current@freebsd.org, Andre Oppermann <andre@freebsd.org>, gallatin@cs.duke.edu
Subject:   Re: Much improved sosend_*() functions
Message-ID:  <451D9440.6060105@cisco.com>
In-Reply-To: <20060929213722.GR80527@funkthat.com>
References:  <451C4850.5030302@freebsd.org> <Pine.BSF.4.58.0609281928020.20971@niwun.pair.com> <451D884F.1030807@cisco.com> <20060929213722.GR80527@funkthat.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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

R


-- 
Randall Stewart
NSSTG - Cisco Systems Inc.
803-345-0369 <or> 815-342-5222 (cell)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?451D9440.6060105>