From 3792683cc6b0a58710f6359520542b24c6af1ea3 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Thu, 7 Mar 2019 10:59:50 -0800 Subject: [PATCH] Set _incomingPacketConcurrency to 1 --- src/Service.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Service.cpp b/src/Service.cpp index 1b96c1d..9908c3a 100644 --- a/src/Service.cpp +++ b/src/Service.cpp @@ -272,7 +272,11 @@ public: _ports[1] = 0; _ports[2] = 0; - _incomingPacketConcurrency = std::max((unsigned long)1,std::min((unsigned long)16,(unsigned long)std::thread::hardware_concurrency())); + /* Packet input concurrency is disabled intentially since it + would force the user-space network stack to constantly re-order + frames, resulting in lower RX performance */ + _incomingPacketConcurrency = 1; + // std::max((unsigned long)1,std::min((unsigned long)16,(unsigned long)std::thread::hardware_concurrency())); char *envPool = std::getenv("INCOMING_PACKET_CONCURRENCY"); if (envPool != NULL) { int tmp = atoi(envPool);