From 17a38f1823adeb9eb059f666686e35509f3a13d2 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 3 Feb 2021 12:00:51 +0100 Subject: [PATCH] flow/manager: (u)sleep slightly longer Sleep 250 microseconds instead of 100 as running in KVM cause the old value to use 100% CPU for these threads. Perf testing suggests no measurable impact for the non-KVM case. Ticket: #4096 --- src/flow-manager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flow-manager.c b/src/flow-manager.c index cb430ec74d..d58a49637d 100644 --- a/src/flow-manager.c +++ b/src/flow-manager.c @@ -1011,7 +1011,7 @@ static TmEcode FlowManager(ThreadVars *th_v, void *thread_data) memset(&sleep_startts, 0, sizeof(sleep_startts)); gettimeofday(&sleep_startts, NULL); #endif - usleep(100); + usleep(250); #ifdef FM_PROFILE struct timeval sleep_endts; @@ -1207,7 +1207,7 @@ static TmEcode FlowRecycler(ThreadVars *th_v, void *thread_data) memset(&sleep_startts, 0, sizeof(sleep_startts)); gettimeofday(&sleep_startts, NULL); #endif - usleep(100); + usleep(250); #ifdef FM_PROFILE struct timeval sleep_endts; memset(&sleep_endts, 0, sizeof(sleep_endts)); -- 2.47.2