From owner-freebsd-current@FreeBSD.ORG Fri Sep 29 21:37:46 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 3731016A407; Fri, 29 Sep 2006 21:37:46 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id 080A643D64; Fri, 29 Sep 2006 21:37:41 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (dcv25qxoqk31iw4t@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.6/8.13.3) with ESMTP id k8TLbQ7L035392; Fri, 29 Sep 2006 14:37:26 -0700 (PDT) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.6/8.13.3/Submit) id k8TLbNJM035391; Fri, 29 Sep 2006 14:37:23 -0700 (PDT) (envelope-from jmg) Date: Fri, 29 Sep 2006 14:37:22 -0700 From: John-Mark Gurney To: Randall Stewart Message-ID: <20060929213722.GR80527@funkthat.com> Mail-Followup-To: Randall Stewart , Mike Silbersack , freebsd-net@freebsd.org, freebsd-current@freebsd.org, Andre Oppermann , gallatin@cs.duke.edu References: <451C4850.5030302@freebsd.org> <451D884F.1030807@cisco.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <451D884F.1030807@cisco.com> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html 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 Reply-To: John-Mark Gurney 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:37:46 -0000 Randall Stewart wrote this message on Fri, Sep 29, 2006 at 16:55 -0400: > Mike Silbersack wrote: > >On Fri, 29 Sep 2006, Andre Oppermann wrote: > > > > > >>over it an copies the data into the mbufs by using uiomove(). > >>sosend_dgram() > >>and sosend_generic() are change to use m_uiotombuf() instead of > >>sosend_copyin(). > > > > > >Can you do some UDP testing with 512b, 1K, 2K, 4K, 8K, and 16K packets to > >see if performance changes there as well? > > Hmm.. I would think 512b and 1K will not show any > improvement.. since they would probably end up either > in an mbuf chain.. or a single 2k (or maybe 4k) cluster.. > ... quite a waste.. now if we had 512b and 1k clusters that > would be cool... > > In fact I have always thought we should: > > a) have no data portion in an mbuf.. just pointers i.e. always > an EXT > > b) Have a 256/512 and 1k cluster too.. > > This would allow copy by reference no matter what size si > being sent... 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, 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... 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... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."