chore(memory-reclaimer): use saner defaults

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto
2025-12-16 16:25:09 +01:00
parent e3e5f59965
commit f3c70a96ba
2 changed files with 5 additions and 3 deletions

View File

@@ -278,7 +278,7 @@ func loadRuntimeSettingsFromFile(options *config.ApplicationConfig) {
options.WatchDogInterval = dur
} else {
log.Warn().Err(err).Str("interval", *settings.WatchdogInterval).Msg("invalid watchdog interval in runtime_settings.json")
options.WatchDogInterval = 10 * time.Second
options.WatchDogInterval = model.DefaultWatchdogInterval
}
}
}

View File

@@ -4,6 +4,8 @@ import (
"time"
)
const DefaultWatchdogInterval = 500 * time.Millisecond
// WatchDogOptions contains all configuration for the WatchDog
type WatchDogOptions struct {
processManager ProcessManager
@@ -105,12 +107,12 @@ func DefaultWatchDogOptions() *WatchDogOptions {
return &WatchDogOptions{
busyTimeout: 5 * time.Minute,
idleTimeout: 15 * time.Minute,
watchdogInterval: 2 * time.Second,
watchdogInterval: DefaultWatchdogInterval,
busyCheck: false,
idleCheck: false,
lruLimit: 0,
memoryReclaimerEnabled: false,
memoryReclaimerThreshold: 0.95,
memoryReclaimerThreshold: 0.80,
}
}