From owner-freebsd-current@FreeBSD.ORG Fri Sep 29 21:47:28 2006 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 697E316A416; Fri, 29 Sep 2006 21:47:28 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from sj-iport-5.cisco.com (sj-iport-5.cisco.com [171.68.10.87]) by mx1.FreeBSD.org (Postfix) with ESMTP id 315B143D49; Fri, 29 Sep 2006 21:47:19 +0000 (GMT) (envelope-from rrs@cisco.com) Received: from sj-dkim-5.cisco.com ([171.68.10.79]) by sj-iport-5.cisco.com with ESMTP; 29 Sep 2006 14:47:19 -0700 X-IronPort-AV: i="4.09,238,1157353200"; d="scan'208"; a="326743810:sNHT2388261358" Received: from sj-core-4.cisco.com (sj-core-4.cisco.com [171.68.223.138]) by sj-dkim-5.cisco.com (8.12.11.20060308/8.12.11) with ESMTP id k8TLlHt9022220; Fri, 29 Sep 2006 14:47:17 -0700 Received: from xbh-sjc-231.amer.cisco.com (xbh-sjc-231.cisco.com [128.107.191.100]) by sj-core-4.cisco.com (8.12.10/8.12.6) with ESMTP id k8TLlHid014772; Fri, 29 Sep 2006 14:47:17 -0700 (PDT) Received: from xfe-sjc-212.amer.cisco.com ([171.70.151.187]) by xbh-sjc-231.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.211); Fri, 29 Sep 2006 14:47:17 -0700 Received: from [127.0.0.1] ([171.68.225.134]) by xfe-sjc-212.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 29 Sep 2006 14:47:16 -0700 Message-ID: <451D9440.6060105@cisco.com> Date: Fri, 29 Sep 2006 17:46:40 -0400 From: Randall Stewart User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050920 X-Accept-Language: en-us, en MIME-Version: 1.0 To: John-Mark Gurney References: <451C4850.5030302@freebsd.org> <451D884F.1030807@cisco.com> <20060929213722.GR80527@funkthat.com> In-Reply-To: <20060929213722.GR80527@funkthat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 29 Sep 2006 21:47:16.0995 (UTC) FILETIME=[D4F31D30:01C6E410] DKIM-Signature: a=rsa-sha1; q=dns; l=1747; t=1159566438; x=1160430438; c=relaxed/simple; s=sjdkim5002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=rrs@cisco.com; z=From:Randall=20Stewart=20 |Subject:Re=3A=20Much=20improved=20sosend_*()=20functions; X=v=3Dcisco.com=3B=20h=3DVUE9hWftOvPULvUJ9EhsWe/RDnk=3D; b=LaxrvinT243oWFgRmCNNcaJnU63/9+vkyO8qPMShp04FDcO4ciaNtNfyJ+NnBwNYRYP2Yi8X sNWZBNVJFH4VKxKyig2ITr/Q1y+QeJGEys147anRqcLeOilrhJeyRfol; Authentication-Results: sj-dkim-5.cisco.com; header.From=rrs@cisco.com; dkim=pass ( sig from cisco.com verified; ); Cc: freebsd-net@freebsd.org, Mike Silbersack , freebsd-current@freebsd.org, Andre Oppermann , gallatin@cs.duke.edu Subject: Re: Much improved sosend_*() functions X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Sep 2006 21:47:28 -0000 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 815-342-5222 (cell)