Skip to contentSkip to conversation

netvsc: increase default receive buffer size

PATCH Applied Stephen Hemminger 2 participants 4 messages Sep 14, 2017 – Sep 15, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 netvsc: increase default receive buffer size

The default receive buffer size was reduced by recent change to a value which was appropriate for 10G and Windows Server 2016. But the value is too small for full performance with 40G on Azure. Increase the default back to maximum supported by host.

Fixes 8b5327975ae1 ("netvsc: allow controlling send/recv buffer size")
---
 drivers/net/hyperv/netvsc_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/hyperv/netvsc_drv.c +1 -1
index c538a4f15f3b..d4902ee5f260 100644
@@ -49,7 +49,7 @@
 #define NETVSC_MIN_TX_SECTIONS	10
 #define NETVSC_DEFAULT_TX	192	/* ~1M */
 #define NETVSC_MIN_RX_SECTIONS	10	/* ~64K */
-#define NETVSC_DEFAULT_RX	2048	/* ~4M */
+#define NETVSC_DEFAULT_RX	10485   /* Max ~16M */
 
 #define LINKCHANGE_INT (2 * HZ)
 #define VF_TAKEOVER_INT (HZ / 10)
Signature · 1 line
2.11.0
maintainer
#1 lore raw

From: Stephen Hemminger <[email protected]>
Date: Thu, 14 Sep 2017 09:31:07 -0700

Quoted 7 lines

The default receive buffer size was reduced by recent change to a value which was appropriate for 10G and Windows Server 2016. But the value is too small for full performance with 40G on Azure. Increase the default back to maximum supported by host.

Fixes 8b5327975ae1 ("netvsc: allow controlling send/recv buffer size")

What other side effects are there to making this buffer so large?

Just curious...

#2 lore raw
Quoted 8 lines · On Thu, 14 Sep 2017 10:02:03 -0700 (PDT) David Miller <[email protected]>…

From: Stephen Hemminger <[email protected]>
Date: Thu, 14 Sep 2017 09:31:07 -0700

Quoted 5 lines

The default receive buffer size was reduced by recent change to a value which was appropriate for 10G and Windows Server 2016. But the value is too small for full performance with 40G on Azure. Increase the default back to maximum supported by host.

Quoted 6 lines
Quoted 2 lines
Fixes 8b5327975ae1 ("netvsc: allow controlling send/recv buffer size")

What other side effects are there to making this buffer so large?

Just curious...

It increase latency and exercises bufferbloat avoidance on TCP. The problem was the smaller buffer caused regressions in UDP benchmarks on 40G Azure. One could argue that this is not a reasonable benchmark but people run it. Apparently, Windows already went the same thing and uses an even bigger buffer.

Longer term there will be more internal discussion with different teams about what the receive latency and buffering needs to be. Also, the issue goes away when doing accelerated networking (SR-IOV) is more widely used.

maintainer Applied
#3 lore raw
In reply to Stephen Hemminger

From: Stephen Hemminger <[email protected]>
Date: Thu, 14 Sep 2017 09:31:07 -0700

Quoted 7 lines

The default receive buffer size was reduced by recent change to a value which was appropriate for 10G and Windows Server 2016. But the value is too small for full performance with 40G on Azure. Increase the default back to maximum supported by host.

Fixes 8b5327975ae1 ("netvsc: allow controlling send/recv buffer size")

Applied.