DragonFly BSD
DragonFly commits List (threaded) for 2012-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

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


From: Sepherosa Ziehau <sephe@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 22 Nov 2012 04:15:33 -0800 (PST)

commit 391741ecf79383bb438422ff3941bac9c50cb988
Author: Sepherosa Ziehau <sephe@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



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]