]> git.ipfire.org Git - people/stevee/guardian.git/commitdiff
guardian: Reduce system load
authorStefan Schantl <stefan.schantl@ipfire.org>
Thu, 21 Dec 2017 14:58:43 +0000 (15:58 +0100)
committerStefan Schantl <stefan.schantl@ipfire.org>
Thu, 21 Dec 2017 14:58:43 +0000 (15:58 +0100)
Reduce the system load by increasing the sleep time of the main loops.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
guardian.in

index b98dc2e85c87c538d2843171d3e525bc73540eff..06fc83d563d0f1b9774fe61e85d48071006c1545 100644 (file)
@@ -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);
                        }
                }
        }