Artwork cache too small: 43% of artwork fetched from the publisher again #460

Closed
opened 2026-11-13 19:37:05 -08:00 by rays · 1 comment
Owner

Over 7 days to 2026-11-14 /api/art was 11,500 requests and 857 s of ipx's 1,270 s of request time, the most of any route. ipx_art_requests_total: 6,337 hits, 4,889 misses; ipx_art_evicted_total: 4,521 in the week; ipx_art_cache_bytes sits at 99.7% of the 500 MB limit (art_cache_mb, default in crates/ipx/src/config.rs). Misses are the slow ones: art_fetch 1-4 s each, up to 5.5 s for a request (traces 5e9644e318dd85e3e7360d2305204, c8139953592dc21cc8dc605e29ed0f4f), mostly in bursts when a list opens.

Evicting about as many images as it misses says the limit is turning the cache over, not that artwork is new. Raise art_cache_mb in production (setting, no code) and watch the hit rate: $Q prom 'sum by (result) (increase(ipx_art_requests_total{job="ipx"}[$range]))' 7d. Related: #448 (artwork that can never be shown is fetched again every hour).

Over 7 days to 2026-11-14 /api/art was 11,500 requests and 857 s of ipx's 1,270 s of request time, the most of any route. ipx_art_requests_total: 6,337 hits, 4,889 misses; ipx_art_evicted_total: 4,521 in the week; ipx_art_cache_bytes sits at 99.7% of the 500 MB limit (art_cache_mb, default in crates/ipx/src/config.rs). Misses are the slow ones: art_fetch 1-4 s each, up to 5.5 s for a request (traces 5e9644e318dd85e3e7360d2305204, c8139953592dc21cc8dc605e29ed0f4f), mostly in bursts when a list opens. Evicting about as many images as it misses says the limit is turning the cache over, not that artwork is new. Raise art_cache_mb in production (setting, no code) and watch the hit rate: `$Q prom 'sum by (result) (increase(ipx_art_requests_total{job="ipx"}[$range]))' 7d`. Related: #448 (artwork that can never be shown is fetched again every hour).
rays added the bug label 2026-11-13 19:37:05 -08:00
Author
Owner

art_cache_mb raised from 500 to 2000 in production's settings, 2026-11-14 04:07 UTC (the cache is on /mnt/fast, 259 GB free; 1,798 images in the 500 MB, about 280 KB each). With #448 cutting the refetches of failing images, misses should fall well under the 43% of last week. To confirm in a week: $Q prom 'sum by (result) (increase(ipx_art_requests_total{job="ipx"}[$range]))' 7d and $Q prom 'sum(increase(ipx_art_evicted_total{job="ipx"}[$range]))' 7d; reopen if evictions stay near the misses.

art_cache_mb raised from 500 to 2000 in production's settings, 2026-11-14 04:07 UTC (the cache is on /mnt/fast, 259 GB free; 1,798 images in the 500 MB, about 280 KB each). With #448 cutting the refetches of failing images, misses should fall well under the 43% of last week. To confirm in a week: `$Q prom 'sum by (result) (increase(ipx_art_requests_total{job="ipx"}[$range]))' 7d` and `$Q prom 'sum(increase(ipx_art_evicted_total{job="ipx"}[$range]))' 7d`; reopen if evictions stay near the misses.
rays closed this issue 2026-11-13 20:06:47 -08:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rays/ipx#460