Bug 14: stream journal reads instead of buffering them; soft memory limit for the GC

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Mitchell-Johnson
2026-09-18 17:51:09 -07:00
co-authored by Claude Fable 5.1
parent 03be65ee99
commit c1805f6ad5
2 changed files with 51 additions and 19 deletions
+5
View File
@@ -13,6 +13,7 @@ import (
"os/user"
"path/filepath"
"runtime"
"runtime/debug"
"strings"
"syscall"
"time"
@@ -171,6 +172,10 @@ func serve(cfg *config.Config) error {
}
}
// Keep the heap tidy: the daemon's live data is tens of MB; without a limit the GC
// happily lets RSS coast at twice that. (Soft limit: exceeding it only means more GC.)
debug.SetMemoryLimit(160 << 20)
col := metrics.NewCollector()
go col.Run(context.Background())