summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2016-06-26 20:16:57 +0200
committerDave Barach <openvpp@barachs.net>2016-06-28 15:08:45 +0000
commita06dfb39c6bee3fbfd702c10e1e1416b98e65455 (patch)
tree2f1e4dc672f0f3af8bfce51aa644618e72d15013
parent310dca43a3d0c1a541d91f54a8034401c702c8e5 (diff)
Reduce ring size for dpdk NICs and overtal mem footprint
Size of interface descriptor rings have direct impact on Last Level Cache utilization, and can significantly affect performance. So generally having smaller ring size is good idea as long as there is enough buffer in the ring to accomodate line rate. Here we are reducing rings sizes to 1024 which is still bigger than lab verified 512 buffers per ring. Indirectly, this also affects memory footprint, as we can have smaller buffer allocation, which is now 16384 (previously it was 32768) This patch also fixes issue with i40e vector PMD which was leaking buffers when previous default ring sizes were set. Change-Id: I58fb40586304b2f0cb5de9a444055da3cd3acb53 Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r--vnet/vnet/devices/dpdk/dpdk.h2
-rw-r--r--vnet/vnet/devices/dpdk/dpdk_priv.h10
-rw-r--r--vnet/vnet/devices/dpdk/init.c2
3 files changed, 7 insertions, 7 deletions
diff --git a/vnet/vnet/devices/dpdk/dpdk.h b/vnet/vnet/devices/dpdk/dpdk.h
index 6d4ded19879..1c3d0bb860f 100644
--- a/vnet/vnet/devices/dpdk/dpdk.h
+++ b/vnet/vnet/devices/dpdk/dpdk.h
@@ -63,7 +63,7 @@
#include <vlib/pci/pci.h>
-#define NB_MBUF (32<<10)
+#define NB_MBUF (16<<10)
extern vnet_device_class_t dpdk_device_class;
extern vlib_node_registration_t dpdk_input_node;
diff --git a/vnet/vnet/devices/dpdk/dpdk_priv.h b/vnet/vnet/devices/dpdk/dpdk_priv.h
index c202d85b590..24c91c6a9ca 100644
--- a/vnet/vnet/devices/dpdk/dpdk_priv.h
+++ b/vnet/vnet/devices/dpdk/dpdk_priv.h
@@ -17,11 +17,11 @@
#define DPDK_NB_TX_DESC_DEFAULT 512
#define DPDK_NB_RX_DESC_VIRTIO 256
#define DPDK_NB_TX_DESC_VIRTIO 256
-#define DPDK_NB_RX_DESC_10GE 2048
-#define DPDK_NB_TX_DESC_10GE 2048
-#define DPDK_NB_RX_DESC_40GE (4096-128)
-#define DPDK_NB_TX_DESC_40GE 2048
-#define DPDK_NB_RX_DESC_ENIC (4096+1024)
+#define DPDK_NB_RX_DESC_10GE 1024
+#define DPDK_NB_TX_DESC_10GE 1024
+#define DPDK_NB_RX_DESC_40GE 1024
+#define DPDK_NB_TX_DESC_40GE 1024
+#define DPDK_NB_RX_DESC_ENIC 1024
/* These args appear by themselves */
#define foreach_eal_double_hyphen_predicate_arg \
diff --git a/vnet/vnet/devices/dpdk/init.c b/vnet/vnet/devices/dpdk/init.c
index 2ae39222e34..1f739494dd1 100644
--- a/vnet/vnet/devices/dpdk/init.c
+++ b/vnet/vnet/devices/dpdk/init.c
@@ -1147,7 +1147,7 @@ dpdk_config (vlib_main_t * vm, unformat_input_t * input)
clib_bitmap_foreach (c, tm->cpu_socket_bitmap, (
{
vec_validate(mem_by_socket, c);
- mem_by_socket[c] = 512; /* default per-socket mem */
+ mem_by_socket[c] = 256; /* default per-socket mem */
}
));
}