Search code examples
tcpudpwiresharktcpreplay

Tcpreplay parameter and CPU usage


I have created a UDP file using Scapy and I'm using tcpreplay to send the packet. I've faced two weird issues:

  1. The number of packets sent is not identical to the (--pps) parameter. Not sure if the answer is (http://tcpreplay.appneta.com/wiki/faq.html#why-doesnt-tcpreplay-send-traffic-as-fast-as-i-told-it-to)
  2. When I send less packets, i.e --pps=10, the CPU load is higher when I send more packets, i.e. --pps=200. I was expecting the other way around.

BTW, I'm using tcpreplay version 3.4.4


Solution

  • Issue 1. many --pps issues fixed in latest Tcpreplay version

    Issue 2. CPU utilization is improved with latest version, but you can still expect to see 100% CPU being reported. In reality CPU utilization is over reported when using -t or --mbps=0 options. In these cases Tcpreplay will yield the sending thread whenever the TX buffers are full. This causes Tcpreplay to become the scheduler for the CPU. The result is a reported 100% CPU, however other processes on the CPU remain responsive.