From owner-freebsd-hackers Wed Mar 12 9:48:48 2003 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 142F737B401 for ; Wed, 12 Mar 2003 09:48:46 -0800 (PST) Received: from smtp-relay.omnis.com (smtp-relay.omnis.com [216.239.128.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5FE7143F3F for ; Wed, 12 Mar 2003 09:48:45 -0800 (PST) (envelope-from wes@softweyr.com) Received: from softweyr.homeunix.net (66-75-151-22.san.rr.com [66.75.151.22]) by smtp-relay.omnis.com (Postfix) with ESMTP id 47EC542F98; Wed, 12 Mar 2003 09:48:44 -0800 (PST) From: Wes Peters Organization: Softweyr To: Luigi Rizzo , Peter Jeremy Subject: Re: Realtek Date: Wed, 12 Mar 2003 09:48:43 -0800 User-Agent: KMail/1.5 Cc: Doug Ambrisko , freebsd-hackers@FreeBSD.ORG References: <200303102102.33694.wes@softweyr.com> <20030312064424.GB6336@cirb503493.alcatel.com.au> <20030312003713.A74419@xorpc.icir.org> In-Reply-To: <20030312003713.A74419@xorpc.icir.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200303120948.43596.wes@softweyr.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Wednesday 12 March 2003 00:37, Luigi Rizzo wrote: > On Wed, Mar 12, 2003 at 05:44:25PM +1100, Peter Jeremy wrote: > ... > > > Are you sure you were generating "wire speed" packets - this is about > > 200,000 packets/sec at Fast speed. "ping -f" runs at whatever rate > > 148,800kpps > > > In order to get 200,000 pps, you're going to need 5-10 hosts > > generating traffic, each with a good NIC and connected to the test > > one is enough as long as it is sufficiently fast (750MHz and above > in my experiments), you use a C program to call sendto() and > generate UDP packets, and your network card can cope with the > outgoing traffic (e.g. there is no way the 'fxp' can transmit > over ~120kpps no matter how fast the CPU is; 'xl' and several 'dc' > supported chips can do the job. Haven't tried other cards. > > Using polling on the sender side helps but it is not > fundamental. Or you can cheat and use a SmartBits-2000 like I did. It can send exactly 148,800 packets per second, with very precise timing of the inter-packet gap, preamble, and actual packet data. You can make a reasonable facsimile of this on FreeBSD with judicious use of -i and -l. Note that these are blasted at a Win2K box because I don't have a FreeBSD box to beat up at the moment: -bash-2.05b$ sudo ping -i 0.000001 -c 5000 204.68.178.2 ... 64 bytes from 204.68.178.2: icmp_seq=4997 ttl=128 time=0.192 ms 64 bytes from 204.68.178.2: icmp_seq=4998 ttl=128 time=0.185 ms 64 bytes from 204.68.178.2: icmp_seq=4999 ttl=128 time=0.173 ms --- 204.68.178.2 ping statistics --- 5000 packets transmitted, 5000 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.104/0.191/0.605/0.033 ms So it seems to keep up reasonably well, but this is misleading. Use -l to force the packets out as quickly as the card can generate them: -bash-2.05b$ sudo ping -i 0.000001 -c 5000 -l 5000 204.68.178.2 ... 64 bytes from 204.68.178.2: icmp_seq=92 ttl=128 time=14.855 ms 64 bytes from 204.68.178.2: icmp_seq=93 ttl=128 time=14.880 ms 64 bytes from 204.68.178.2: icmp_seq=4424 ttl=128 time=17.308 ms --- 204.68.178.2 ping statistics --- 5000 packets transmitted, 95 packets received, 98% packet loss round-trip min/avg/max/stddev = 11.929/14.520/17.308/0.682 ms Wow. The receiving side handled the first 93 packets and then rolled over, recovering for only the last packet. (Look at the icmp_seq numbers.) FreeBSD behaves similarly, but try the test on your own. ;^) -- Where am I, and what am I doing in this handbasket? Wes Peters wes@softweyr.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message