netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@redhat.com>
To: eric.dumazet@gmail.com
Cc: netdev@vger.kernel.org, amirv@mellanox.com,
	ogerlitz@mellanox.com, willemb@google.com
Subject: Re: [PATCH v2 net-next 2/2] mlx4: use napi_complete_done()
Date: Fri, 07 Nov 2014 17:00:53 -0500 (EST)	[thread overview]
Message-ID: <20141107.170053.1003349690694025765.davem@redhat.com> (raw)
In-Reply-To: <1415337011.13896.103.camel@edumazet-glaptop2.roam.corp.google.com>

From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 06 Nov 2014 21:10:11 -0800

> From: Eric Dumazet <edumazet@google.com>
> 
> To enable gro_flush_timeout, a driver has to use napi_complete_done()
> instead of napi_complete().
> 
> Tested:
>  Ran 200 netperf TCP_STREAM from A to B (10Gbe mlx4 link, 8 RX queues)
> 
> Without this feature, we send back about 305,000 ACK per second.
> 
> GRO aggregation ratio is low (811/305 = 2.65 segments per GRO packet)
> 
> Setting a timer of 2000 nsec is enough to increase GRO packet sizes
> and reduce number of ACK packets. (811/19.2 = 42)
> 
> Receiver performs less calls to upper stacks, less wakes up.
> This also reduces cpu usage on the sender, as it receives less ACK
> packets.
> 
> Note that reducing number of wakes up increases cpu efficiency, but can
> decrease QPS, as applications wont have the chance to warmup cpu caches
> doing a partial read of RPC requests/answers if they fit in one skb.
> 
> B:~# sar -n DEV 1 10 | grep eth0 | tail -1
> Average:         eth0 811269.80 305732.30 1199462.57  19705.72      0.00
> 0.00      0.50
> 
> B:~# echo 2000 >/sys/class/net/eth0/gro_flush_timeout
> 
> B:~# sar -n DEV 1 10 | grep eth0 | tail -1
> Average:         eth0 811577.30  19230.80 1199916.51   1239.80      0.00
> 0.00      0.50
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied.

  reply	other threads:[~2014-11-07 22:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-07  5:10 [PATCH v2 net-next 2/2] mlx4: use napi_complete_done() Eric Dumazet
2014-11-07 22:00 ` David Miller [this message]
2014-11-10 18:01   ` Eric Dumazet
2014-11-10 22:07     ` [PATCH net-next] mlx4: restore conditional call to napi_complete_done() Eric Dumazet
2014-11-11  2:13       ` David Miller

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=20141107.170053.1003349690694025765.davem@redhat.com \
    --to=davem@redhat.com \
    --cc=amirv@mellanox.com \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=ogerlitz@mellanox.com \
    --cc=willemb@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).