Skip to content

Add config knob to throttle background summarizer speed #71

Open

Description

@diskerror

Summary

The summarizer's enqueue_catch_up() dumps all unsummarized turns into the queue at once and processes them as fast as inference allows. When a large batch of historical turns is imported (e.g. from a Claude.ai export), this can monopolize the Beelink inference endpoint for hours.

Proposed config (in [housekeeping] or [summarizer] section of settings.ini)

summarizer_delay_ms = 0   # ms to sleep between summarizer jobs (0 = no throttle, default)

Implementation

In SummarizerService's worker loop (src/summarizer_service.cpp), after completing a job and before picking up the next, sleep for config().summarizer_delay_ms when the value is > 0. This keeps the queue draining but at a user-controlled pace.

Use cases

  • Normal operation: 0 (no delay, drain as fast as possible)
  • Running alongside active inference workloads: e.g. 5000 (5s between jobs ≈ ~12/min)
  • Overnight catch-up import: leave at 0 to finish fast

Notes

  • The delay applies per-job (L2, L3, L4, draft retry) — simplest and most predictable
  • SIGHUP-reloadable so it can be adjusted without a daemon restart
  • Pairs naturally with the existing housekeeping_interval cadence
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions