public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Robert Hoo <robert.hu@linux•intel.com>
To: brouer@redhat•com, davem@davemloft•net, tariqt@mellanox•com,
	kyle.leet@gmail•com
Cc: netdev@vger•kernel.org, robert.hu@intel•com
Subject: [pktgen script v2 0/2] Add a pktgen sample script of NUMA awareness
Date: Sun, 17 Sep 2017 20:36:36 +0800	[thread overview]
Message-ID: <1505651798-106642-1-git-send-email-robert.hu@linux.intel.com> (raw)

From: Robert Hoo <robert.hu@intel•com>

It's hard to benchmark 40G+ network bandwidth using ordinary
tools like iperf, netperf (see reference 1). 
Pktgen, packet generator from Kernel sapce, shall be a candidate.
I derived this NUMA awared irq affinity sample script from
multi-queue sample02, successfully benchmarked 40G link. I think this can
also be useful for 100G reference, though I haven't got device to test yet.

This script simply does:
Detect $DEV's NUMA node belonging.
Bind each thread (processor of NUMA locality) with each $DEV queue's
irq affinity, 1:1 mapping.
How many '-t' threads input determines how many queues will be
utilized.
If '-f' designates first cpu id, then offset in the NUMA node's cpu
list.

Tested with Intel XL710 NIC with Cisco 3172 switch.

Referrences:
https://people.netfilter.org/hawk/presentations/LCA2015/net_stack_challenges_100G_LCA2015.pdf
http://www.intel.cn/content/dam/www/public/us/en/documents/reference-guides/xl710-x710-performance-tuning-linux-guide.pdf

Change log
v2:
	Rebased to https://github.com/netoptimizer/network-testing/tree/master/pktgen
	Move helper functions to functions.sh
	More concise shell grammar usage
	Take '-f' parameter into consideration. If the first CPU is designaed,
offset in the NUMA-aware CPU list.
	Use err(), info() helper functions for such outputs.

Robert Hoo (2):
  Add some helper functions
  Add pktgen script: pktgen_sample06_numa_awared_queue_irq_affinity.sh

 pktgen/functions.sh                                | 44 ++++++++++
 ...tgen_sample06_numa_awared_queue_irq_affinity.sh | 97 ++++++++++++++++++++++
 2 files changed, 141 insertions(+)
 create mode 100755 pktgen/pktgen_sample06_numa_awared_queue_irq_affinity.sh

-- 
1.8.3.1

             reply	other threads:[~2017-09-17 12:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-17 12:36 Robert Hoo [this message]
2017-09-17 12:36 ` [pktgen script v2 1/2] Add some helper functions Robert Hoo
2017-09-17 12:36 ` [pktgen script v2 2/2] Add pktgen script: pktgen_sample06_numa_awared_queue_irq_affinity.sh Robert Hoo
2017-09-18  9:06 ` [pktgen script v2 0/2] Add a pktgen sample script of NUMA awareness Jesper Dangaard Brouer
2017-09-22 14:06   ` Jesper Dangaard Brouer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1505651798-106642-1-git-send-email-robert.hu@linux.intel.com \
    --to=robert.hu@linux$(echo .)intel.com \
    --cc=brouer@redhat$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=kyle.leet@gmail$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=robert.hu@intel$(echo .)com \
    --cc=tariqt@mellanox$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox