Date: Wed, 12 Mar 2003 09:48:43 -0800 From: Wes Peters <wes@softweyr.com> To: Luigi Rizzo <rizzo@icir.org>, Peter Jeremy <peterjeremy@optushome.com.au> Cc: Doug Ambrisko <ambrisko@ambrisko.com>, freebsd-hackers@FreeBSD.ORG Subject: Re: Realtek Message-ID: <200303120948.43596.wes@softweyr.com> In-Reply-To: <20030312003713.A74419@xorpc.icir.org> References: <200303102102.33694.wes@softweyr.com> <20030312064424.GB6336@cirb503493.alcatel.com.au> <20030312003713.A74419@xorpc.icir.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303120948.43596.wes>