The daemon runs a scan pass every minute, nearly always for nothing #114

Closed
opened 2026-10-02 12:49:29 -07:00 by rays · 1 comment
Owner

The scheduler ticks every 60 s (main.rs, ticker) and each tick runs a full scan pass: subscriptions, http_state for every feed (~180 queries) to find which are due, and before it the reap sweep (missing files, quota and age, the Directory cleanup, the artwork cache trim). Most passes find no feed due and fetch nothing: 362 scan_done in 6 h on 2026-10-02, nearly all with feeds=0, each a trace in Tempo and an event to every open page. Wanted: after a pass, sleep until the next feed is due (commands still wake it at once), and run the sweep on its own, slower clock, e.g. hourly.

The scheduler ticks every 60 s (main.rs, ticker) and each tick runs a full scan pass: subscriptions, http_state for every feed (~180 queries) to find which are due, and before it the reap sweep (missing files, quota and age, the Directory cleanup, the artwork cache trim). Most passes find no feed due and fetch nothing: 362 scan_done in 6 h on 2026-10-02, nearly all with feeds=0, each a trace in Tempo and an event to every open page. Wanted: after a pass, sleep until the next feed is due (commands still wake it at once), and run the sweep on its own, slower clock, e.g. hourly.
rays added the enhancement label 2026-10-02 12:49:29 -07:00
Author
Owner

Fixed in ec8fd5d: the daemon sleeps until the earliest feed is due (30 s to 10 minutes) instead of a scan pass every minute; commands wake it, and the first pass after start runs at once. One query for every feed's check state. After the 19:57 deploy every scan but the start-up one checked feeds (6, 8, 15, 34), where before 81% checked none.

Fixed in ec8fd5d: the daemon sleeps until the earliest feed is due (30 s to 10 minutes) instead of a scan pass every minute; commands wake it, and the first pass after start runs at once. One query for every feed's check state. After the 19:57 deploy every scan but the start-up one checked feeds (6, 8, 15, 34), where before 81% checked none.
rays closed this issue 2026-10-02 13:01:45 -07:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rays/ipx#114