From 27379f3940435397c9dae361a58d38c2e7adc0d4 Mon Sep 17 00:00:00 2001 From: Lizzy Fleckenstein Date: Thu, 2 Apr 2026 02:30:53 +0200 Subject: tweak burst detection for multicore systems --- burstdog.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/burstdog.c b/burstdog.c index da8dedc..f39e6a2 100644 --- a/burstdog.c +++ b/burstdog.c @@ -14,8 +14,8 @@ // settings #define BURSTDOG_IV 10 // how often to wake up, per second -#define BURSTDOG_BURST 98 // cpu time percentage considered a burst -#define BURSTDOG_BURST_END 90 // cpu time percentage considered the end of a burst +#define BURSTDOG_BURST 120 // cpu time percentage considered a burst +#define BURSTDOG_BURST_END 100 // cpu time percentage considered the end of a burst #define BURSTDOG_SAMPLES 5 // how many samples a burst needs to persist for to be logged #define BURSTDOG_USE_TOTAL 1 // 0: consider processes individually 1: consider total cpu usage and log top processes #define BURSTDOG_CULPRITS 5 // for BURSTDOG_USE_TOTAL: how many processes are logged on burst @@ -279,12 +279,12 @@ int main(int argc, char **argv) uint64_t total = cpu_stats[0].total - cpu_stats[BURSTDOG_SAMPLES-1].total; uint64_t busy = cpu_stats[0].busy - cpu_stats[BURSTDOG_SAMPLES-1].busy; uint64_t share = nproc * busy * 100 / total; - uint64_t level = 2*share/BURSTDOG_BURST; bool do_log = false; - if (bursting && share < BURSTDOG_BURST_END) { + if (share < BURSTDOG_BURST_END) { bursting = 0; } else if (share >= BURSTDOG_BURST) { + uint64_t level = (share-BURSTDOG_BURST)/50+1; if (level > bursting) do_log = true; bursting = level; -- cgit v1.2.3