From: Stefan Schantl Date: Thu, 21 Dec 2017 14:58:43 +0000 (+0100) Subject: guardian: Reduce system load X-Git-Tag: 2.0.1~4 X-Git-Url: http://git.ipfire.org/?p=people%2Fstevee%2Fguardian.git;a=commitdiff_plain;h=396aba99d1d9dc983959b66bacef2c8586f04df2 guardian: Reduce system load Reduce the system load by increasing the sleep time of the main loops. Signed-off-by: Stefan Schantl --- diff --git a/guardian.in b/guardian.in index b98dc2e..06fc83d 100644 --- a/guardian.in +++ b/guardian.in @@ -147,8 +147,8 @@ while(1) { # if items from the block list can be dropped. $events->RemoveBlocks(); - # Sleep 10ms to reduce the load of the main process. - sleep(0.01); + # Sleep 50ms to reduce the load of the main process. + sleep(0.05); } # @@ -275,8 +275,8 @@ sub Worker ($) { } } } else { - # Sleep for 10ms until the next round of the loop will start. - sleep(0.01); + # Sleep for 100ms until the next round of the loop will start. + sleep(0.1); } } }