git: pktgen: Rework to improve performance using low CPU frequency

Sepherosa Ziehau sephe at crater.dragonflybsd.org
Thu Nov 22 04:15:33 PST 2012


commit 391741ecf79383bb438422ff3941bac9c50cb988
Author: Sepherosa Ziehau <sephe at dragonflybsd.org>
Date:   Sat Nov 17 18:07:21 2012 +0800

    pktgen: Rework to improve performance using low CPU frequency
    
    The performance improvement is measured on AMD970 operating at 800Mhz
    w/ Intel 82575 NIC using 18bytes UDP datagrams.
    
    - Don't refill and allocate new packets for each transmission, instead
      a set of pregenerated packets are used.
    - Use NIC driver's "txeof" to tick out more packets instead of bindly
      trying to inject more packets into NIC's TX ring.
    
    These above two modifications give me ~200Kpps (710Kpps -> 910Kpps)
    transmission rate improvement.
    
    - Don't use hardware TX checksum offloading feature.  Since the set of
      packets to be used are pregenerated, this will not hurt performance,
      instead, this could improve performance on certain hardwares, e.g.
      Intel's NIC chipsets which require additional TX descriptor for setting
      up hardware TX checksum offload context.
    
    The above modification give me additional ~40Kpps transmission rate
    improvement.

Summary of changes:
 tools/tools/netrate/pktgen/pktgen.c       |  563 ++++++++++++++---------------
 tools/tools/netrate/pktgen/pktgen.h       |   15 +-
 tools/tools/netrate/pktgenctl/Makefile    |    2 +-
 tools/tools/netrate/pktgenctl/pktgenctl.c |  128 +++----
 4 files changed, 342 insertions(+), 366 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/391741ecf79383bb438422ff3941bac9c50cb988


-- 
DragonFly BSD source repository


More information about the Commits mailing list