summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesper Dangaard Brouer <brouer@redhat.com>2014-04-27 18:09:38 +0200
committerJesper Dangaard Brouer <brouer@redhat.com>2014-04-27 18:11:08 +0200
commitd21b30bd64fdf4e7358037aa2d6f0cea02c49b6e (patch)
treeecdf9727c757a3f188a8798ed1753cac7e9507a1
parent3398b35c047d97b22a52f4dc4a0d5eabf50a96ef (diff)
trafgen: performance regression at 10G due to smaller ring buffer size
commit c10621e ("trafgen: keep a small initial ring buffer size to reduce cache-misses") reduced default ring buffer size to 196KiB, but on my big machines with 10Gbit/s this size is too small. Increase default ring-size to 512 KiB, yield the best results, without increasing ring buffer size too much, this fixes #120. Single CPU results from my E5-2630 CPU with intel ixgbe/82599. (Cmd: trafgen --cpp --dev eth8 --conf udp_example01.trafgen --cpu 1) * 769,440 pkts/sec -- default ring-size 196 KiB * 1,417,908 pkts/sec -- ring-size 500 KiB Going above CPUs L3 cache size which is (15Mb) * 1,236,580 pkts/sec -- ring-size 20000KiB The mmap'ed ring buffer is now faster than using sendto(). For comparison, not using the ring-buffer, by using option "-t0": * 1,381,364 (with qdisc bypass) And using the qdisc code path in the kernel (enable via parameter "--qdisc-path") * 1,227,772 pkts/sec (with --qdisc-path) Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
-rw-r--r--trafgen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/trafgen.c b/trafgen.c
index af15ef2..66be7d6 100644
--- a/trafgen.c
+++ b/trafgen.c
@@ -875,7 +875,7 @@ int main(int argc, char **argv)
ctx.qdisc_path = false;
/* Keep an initial small default size to reduce cache-misses. */
- ctx.reserve_size = 196 * (1 << 10);
+ ctx.reserve_size = 512 * (1 << 10);
while ((c = getopt_long(argc, argv, short_options, long_options,
&opt_index)) != EOF) {