Received: by 10.223.164.202 with SMTP id h10csp299701wrb; Thu, 30 Nov 2017 10:30:29 -0800 (PST) X-Google-Smtp-Source: AGs4zMYz7fGatli2Jq7mrjIFrdiCaOA8ELi9wSgzL4rkUIVCQe1cMVasttAsd+bl3TS6m15/8NJw X-Received: by 10.84.171.195 with SMTP id l61mr3561979plb.129.1512066628981; Thu, 30 Nov 2017 10:30:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512066628; cv=none; d=google.com; s=arc-20160816; b=mUK8TRppo61xN5EayFFd1MmPONHr1K6eN0Ug5gZhm6W3vAGaeD4UUKs2XVqN0GESiG UL2HEj7Z7wTwsskBGkkKBXBeGvAU4VqBkkpi5lnvT9nWTHm435FvejZfEOyEMElsLOR/ Sawu31DMFfxS1INy1L0zkG98EzJ6c/vF7NbFlI2a/an5FTZJGbz5Y5RO7SA6ttzMQ/sz gcuPRZA3sW1YZJsw7twOEp5dND2Q+FVsbWXfcwmkvSwX14Vm8KsQD82Ar8LaX6sN0Si+ 1ctBKUvVoJ75jCmRjqyTsdUCoDHAAnrnZWXzvLMq9Hn0pSRhthLFKKhAsYqj9hCXidZu wLww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=r+dPmeXkzrLIA2TdgeDO/sTnXqY24Us42PP/bstWgrs=; b=juwv1dnst3fsSo1A2mPZ6LdVnMK4fh2isdpEBo1y30l6ouk7Dit30oCUFJz370QVsC xI+XxjA75vqK5JBYcU92uAueEhmYciC3VwuTf50qp83CXD9QPZfHiL7BPov51FxWyt94 Zoc+WH1f1vDoofDrFz43+gl0ACQWbmtLP1tOqAcTv3rmc/EUGcTV0a0HV7U3ryJZv8RF kNAR0ioweuJUDGF+hwZfh9a+iKpwfbrqvjocpFt4Y+K/WjC3mI6W/4TJhdUu54I0yBes G/pZHg1BUrPfxVULHI6it+blBlagyAKOZEzWEPXySk0uvp7zUjWCxdfZwdsSiltnmdRR QRuQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a7si3350927pgc.357.2017.11.30.10.30.15; Thu, 30 Nov 2017 10:30:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751694AbdK3S3z (ORCPT + 99 others); Thu, 30 Nov 2017 13:29:55 -0500 Received: from ex13-edg-ou-002.vmware.com ([208.91.0.190]:50969 "EHLO EX13-EDG-OU-002.vmware.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750735AbdK3S3x (ORCPT ); Thu, 30 Nov 2017 13:29:53 -0500 Received: from sc9-mailhost3.vmware.com (10.113.161.73) by EX13-EDG-OU-002.vmware.com (10.113.208.156) with Microsoft SMTP Server id 15.0.1156.6; Thu, 30 Nov 2017 10:29:47 -0800 Received: from prmh-dev-net-dhcp153.eng.vmware.com (prmh-dev-net-dhcp156.eng.vmware.com [10.20.191.156]) by sc9-mailhost3.vmware.com (Postfix) with ESMTP id 0E5AB4055F; Thu, 30 Nov 2017 10:29:53 -0800 (PST) From: Shrikrishna Khare To: , , CC: Shrikrishna Khare Subject: [PATCH net-next v2] vmxnet3: increase default rx ring sizes Date: Thu, 30 Nov 2017 10:29:51 -0800 Message-ID: <20171130182951.4970-1-skhare@vmware.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Content-Type: text/plain Received-SPF: None (EX13-EDG-OU-002.vmware.com: skhare@vmware.com does not designate permitted sender hosts) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org There are several reasons for increasing the receive ring sizes: 1. The original ring size of 256 was chosen about 10 years ago when vmxnet3 was first created. At that time, 10Gbps Ethernet was not prevalent and servers were dominated by 1Gbps Ethernet. Now 10Gbps is common place, and higher bandwidth links -- 25Gbps, 40Gbps, 50Gbps -- are starting to appear. 256 Rx ring entries are simply not enough to keep up with higher link speed when there is a burst of network frames coming from these high speed links. Even with full MTU size frames, they are gone in a short time. It is also more common to have a mix of frame sizes, and more likely bi-modal distribution of frame sizes so the average frame size is not close to full MTU. If we consider average frame size of 800B, 1024 frames that come in a burst takes ~0.65 ms to arrive at 10Gbps. With 256 entires, it takes ~0.16 ms to arrive at 10Gbps. At 25Gbps or 40Gbps, this time is reduced accordingly. 2. On a hypervisor where there are many VMs and CPU is over committed, i.e. the number of VCPUs is more than the number of VCPUs, each PCPU is in effect time shared between multiple VMs/VCPUs. The time granularity at which this multiplexing occurs is typically coarser than between processes on a guest OS. Trying to time slice more finely is not efficient, for example, if memory cache is barely warmed up when switching from one VM to another occurs. This CPU overcommit adds delay to when the driver in a VM can service incoming packets. Whether CPU is over committed really depends on customer workloads. For certain situations, it is very common. For example, workloads of desktop VMs and product testing setups. Consolidation and sharing is what drives efficiency of a customer setup for such workloads. In these situations, the raw network bandwidth may not be very high, but the delays between when a VM is running or not running can also be relatively long. Signed-off-by: Shrikrishna Khare Acked-by: Jin Heo Acked-by: Guolin Yang Acked-by: Boon Ang --- v1->v2: revise commit message to explain the motivation for increasing the ring size. --- drivers/net/vmxnet3/vmxnet3_int.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/vmxnet3/vmxnet3_int.h b/drivers/net/vmxnet3/vmxnet3_int.h index 9c51b8be0038..5ba222920e80 100644 --- a/drivers/net/vmxnet3/vmxnet3_int.h +++ b/drivers/net/vmxnet3/vmxnet3_int.h @@ -69,10 +69,10 @@ /* * Version numbers */ -#define VMXNET3_DRIVER_VERSION_STRING "1.4.a.0-k" +#define VMXNET3_DRIVER_VERSION_STRING "1.4.11.0-k" /* a 32-bit int, each byte encode a verion number in VMXNET3_DRIVER_VERSION */ -#define VMXNET3_DRIVER_VERSION_NUM 0x01040a00 +#define VMXNET3_DRIVER_VERSION_NUM 0x01040b00 #if defined(CONFIG_PCI_MSI) /* RSS only makes sense if MSI-X is supported. */ @@ -416,8 +416,8 @@ struct vmxnet3_adapter { /* must be a multiple of VMXNET3_RING_SIZE_ALIGN */ #define VMXNET3_DEF_TX_RING_SIZE 512 -#define VMXNET3_DEF_RX_RING_SIZE 256 -#define VMXNET3_DEF_RX_RING2_SIZE 128 +#define VMXNET3_DEF_RX_RING_SIZE 1024 +#define VMXNET3_DEF_RX_RING2_SIZE 256 #define VMXNET3_DEF_RXDATA_DESC_SIZE 128 -- 2.11.0 From 1585425555039652260@xxx Wed Nov 29 18:20:32 +0000 2017 X-GM-THRID: 1585417621512033389 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread