From owner-freebsd-net@FreeBSD.ORG Mon Jul 7 13:31:00 2008 Return-Path: Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 974E91065678 for ; Mon, 7 Jul 2008 13:31:00 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp02.sth.basefarm.net (ch-smtp02.sth.basefarm.net [80.76.149.213]) by mx1.freebsd.org (Postfix) with ESMTP id 18B968FC19 for ; Mon, 7 Jul 2008 13:30:59 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from c83-253-25-183.bredband.comhem.se ([83.253.25.183]:64382 helo=falcon.midgard.homeip.net) by ch-smtp02.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1KFqZM-000246-9G for freebsd-net@FreeBSD.org; Mon, 07 Jul 2008 15:15:53 +0200 Received: (qmail 32464 invoked from network); 7 Jul 2008 15:15:50 +0200 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 7 Jul 2008 15:15:50 +0200 Received: (qmail 69245 invoked by uid 1001); 7 Jul 2008 15:15:50 +0200 Date: Mon, 7 Jul 2008 15:15:50 +0200 From: Erik Trulsson To: Bruce Evans Message-ID: <20080707131550.GA69202@owl.midgard.homeip.net> References: <486D35A0.4000302@gtcomm.net> <486DF1A3.9000409@gtcomm.net> <486E65E6.3060301@gtcomm.net> <4871DB8E.5070903@freebsd.org> <20080707191918.B4703@besplex.bde.org> <4871FB66.1060406@freebsd.org> <20080707213356.G7572@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080707213356.G7572@besplex.bde.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Originating-IP: 83.253.25.183 X-Scan-Result: No virus found in message 1KFqZM-000246-9G. X-Scan-Signature: ch-smtp02.sth.basefarm.net 1KFqZM-000246-9G a6ef90968226b3c1c836da5aec42df3b Cc: FreeBSD Net , Andre Oppermann , Ingo Flaschberger , Paul Subject: Re: Freebsd IP Forwarding performance (question, and some info) [7-stable, current, em, smp] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Jul 2008 13:31:00 -0000 On Mon, Jul 07, 2008 at 10:30:53PM +1000, Bruce Evans wrote: > On Mon, 7 Jul 2008, Andre Oppermann wrote: > > > Bruce Evans wrote: > >> What are the other overheads? I calculate 1.644Mpps counting the > >> inter-frame > >> gap, with 64-byte packets and 64-header_size payloads. If the 64 bytes > >> is for the payload, then the max is much lower. > > > > The theoretical maximum at 64byte frames is 1,488,100. I've looked > > up my notes the 1.244Mpps number can be ajusted to 1.488Mpps. > > Where is the extra? I still get 1.644736 Mpps (10^9/(8*64+96)). > 1.488095 is for 64 bits extra (10^9/(8*64+96+64)). A standard ethernet frame (on the wire) consists of: 7 octets preamble 1 octet Start Frame Delimiter 6 octets destination address 6 octets source address 2 octets length/type 46-1500 octets data (+padding if needed) 4 octets Frame Check Sequence Followed by (at least) 96 bits interFrameGap, before the next frame starts. For minimal packet size this gives a maximum packet rate at 1Gbit/s of 1e9/((7+1+6+6+2+46+4)*8+96)/ = 1488095 packets/second You probably missed the preamble and start frame delimiter in your calculation. -- Erik Trulsson ertr1013@student.uu.se