tcpdump mailing list archives

Re: transmitting packets


From: Jan Allman <ian_yeovil () yahoo co uk>
Date: Tue, 4 Apr 2006 14:33:01 +0100 (BST)

Rick, 
   
  I'm tring to see how much data I can send over a point to point Ethernet link using UDP (i.e. as quickly as 
possible). I had a repeating loop of "sendto" calls. I was using Ethereal to report statistics on the throughput I was 
achieving. 
   
  Repeating your test on my machines (between one dual 2.8GHz machine and one 3GHz machine)... 
   
  netperf -t UDP_STREAM -H 192.168.0.6 -c -C -- -m 1472
UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 
192.168.0.6 (192.168.0.6) port 0 AF_INET
Socket Message Elapsed Messages CPU Service
Size Size Time Okay Errors Throughput Util Demand
bytes bytes secs # # 10^6bits/sec % SS us/KB

65535 1472 10.00 811659 0 956.0 15.61 5.410
65535 10.00 802851 946.6 49.18 4.201

  Is this telling me I am able to get 950Mbps of throughput? (I've never used netperf before) 
  When I use Ethereal it calculated an "Avg. MBit/sec" of 177.592 (linux kernel 2.4.24, libpcap 0.8.3, ethereal 
0.10.7). Do you know why this is so much less than the netperf reports?  
  Is Ethereal reporting a low rate because it is dropping data due to having to maintain its GUI? Is Ethereal 
displaying a low throughput rate due to libpcap limitations for 1472 bytes sized frames? 
   
  Many Thanks, 
   
  Ian J. Allman
   
  
Rick Jones <rick.jones2 () hp com> wrote:
  Jan Allman wrote:
Is it possible to send standard Ethernet packets at near Gigabit
throughput using UDP packets and libpcap?
Has anyone tried this before. I am wondering whether libpcap is a
more optimum approach to the standard Linux "sendto" function.

It could very well be, assuming you are willing to craft your own UDP 
headers, but it begs the question "Why?" Most CPU's these days (well, 
most "decent" CPUs :) can use send()/sendto() to generate traffic at 
gigabit speeds.

Between a pair of 2x1GHz Itanium2 systems running a 2.6.12 kernel:


loiter:/opt/netperf2_work# src/netperf -t UDP_STREAM -H 192.168.4.215 -c 
-C -- -m 1472
UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 
192.168.4.215 (192.168.4.215) port 0 AF_INET
Socket Message Elapsed Messages CPU Service
Size Size Time Okay Errors Throughput Util Demand
bytes bytes secs # # 10^6bits/sec % SS us/KB

135168 1472 10.00 812799 0 957.1 19.02 3.256
135168 10.00 812799 957.1 23.12 3.958

They weren't even breaking a sweat :)


What sort of problem are you looking to solve?

For just blasting frames onto the wire, there is the in-kernel pktgen 
stuff under linux.

sincerely,

rick jones
-
This is the tcpdump-workers list.
Visit https://lists.sandelman.ca/ to unsubscribe.


                
---------------------------------
Yahoo! Messenger  NEW - crystal clear PC to PC calling worldwide with voicemail -
This is the tcpdump-workers list.
Visit https://lists.sandelman.ca/ to unsubscribe.


Current thread: