Aaron, Thanks for your helpful information!
Roger -----Original Message----- From: Aaron Turner [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 2:07 AM To: Main forum for tcpreplay Subject: Re: [Tcpreplay-users] tcpreplay questions Hi Roger, On Mon, Sep 22, 2008 at 7:04 AM, Zhang, Long (Roger) <[EMAIL PROTECTED]> wrote: > Hi, > > > > I have a question about tcpreplay sending speed. The -mbps specifies the > replay speed. But I found the pcap file is not replayed at the designed > speed. I think it is not a bug. Just want to help me to clarify why there is > such a big gap between the designed speed and the rated speed. The FAQ and online manual have a lot of information about getting the best performance out of tcpreplay. There may be ways to improve performance (better hardware, increasing buffer sizes in the kernel, etc) as well as tricks using tcpreplay (memory cache when looping, different timing methods, etc). > Another > question is Mbps is speed, why the rated speed is Mbps/sec? Because I'm stupid. :) > For example, I want to send packets at 1000 Mbps, but from the result, the > speed is 68.98 Mbps. >>tcpreplay -i eth2 --mbps=1000 /home/pat/capdata/packets_0504.pcap > > sending out eth2 > > processing file: /home/pat/capdata/packets_0504.pcap > > Actual: 2134756 packets (137197824 bytes) sent in 15.17 seconds > > Rated: 9041873.0 bps, 68.98 Mbps/sec, 140688.77 pps > > > > Statistics for network device: eth2 > > Attempted packets: 5146064 > > Successful packets: 2134756 > > Failed packets: 0 > > Retried packets (ENOBUFS): 3011308 > > Retried packets (EAGAIN): 0 > That's a pretty big difference, but I see you're getting a lot of retries due to out of buffers. That's killing your performance. Also, I'm guessing you're sending really small packets (looks like your average size is 64 bytes) which frankly you're not going to see great performance numbers with using most setups (the overhead of sending a packet is pretty constant and there is an upper limit). Honestly, 140K packets/sec isn't too shabby using the --mbps. You could probably get a performance boost using --topspeed, but you'll need to fix that buffer issue first. > > Same packets, --mbps is set to 150 Mbps, the result speed is 8.70 Mbps. > > > >>tcpreplay -i eth2 --mbps=150 /home/pat/capdata/packets_0504.pcap > > sending out eth2 > > processing file: /home/pat/capdata/packets_0504.pcap > > Actual: 2134756 packets (137197824 bytes) sent in 120.25 seconds > > Rated: 1140866.4 bps, 8.70 Mbps/sec, 17751.53 pps > > > > Statistics for network device: eth2 > > Attempted packets: 2134756 > > Successful packets: 2134756 > > Failed packets: 0 > > Retried packets (ENOBUFS): 0 > > Retried packets (EAGAIN): 0 > No buffer issue here, just timing. You'll want to read: http://tcpreplay.synfin.net/trac/wiki/tcpreplay#ChoosingaTimingMethod and: http://tcpreplay.synfin.net/trac/wiki/tcpreplay#TuningforHigh-Performanc e Unfortunately, there are limits to writing accurate high-speed timing algorithms for different operating systems on a wide range of hardware as well as my own coding skills. At some point, I need the user to intervene to help out. That's what the --timer, --sleep-accel and --rdtsc-clicks options are for. If you or anyone has experience with high performance timing/networking and wants to help me brain storm on a better solution I'm all for it. :) Finally, I want to make this clear- using the --mbps and --multiplier options will never give the best results due to the calculations necessary. You're much better off using --pps for controlling speed. > > The tcpreplay version > [snip] Obviously, 3.3.2 is the latest version, but I don't think any of the bugs fixed effect you. -- Aaron Turner http://synfin.net/ http://tcpreplay.synfin.net/ - Pcap editing and replay tools for Unix & Windows They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety. -- Benjamin Franklin ------------------------------------------------------------------------ - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Tcpreplay-users mailing list Tcpreplay-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tcpreplay-users Support Information: http://tcpreplay.synfin.net/trac/wiki/Support ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Tcpreplay-users mailing list Tcpreplay-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tcpreplay-users Support Information: http://tcpreplay.synfin.net/trac/wiki/Support