doc: improve comment on min_resident_size

This commit is contained in:
Christian Schwarz
2023-03-28 18:06:44 +02:00
parent dc72a9534e
commit 704d4f4640

View File

@@ -559,9 +559,9 @@ async fn collect_eviction_candidates(
// `min_resident_size` defaults to maximum layer file size of the tenant.
// This ensures that each tenant can have at least one layer resident at a given time,
// ensuring forward progress for a single Timeline::get in that tenant.
// It's a questionable heuristic since there are many Timeline::get
// requests going on and multiple layers are needed, and, at least in Neon prod,
// the median layer file size is much smaller than the compaction target size.
// It's a questionable heuristic since, usually, there are many Timeline::get
// requests going on for a tenant, and, at least in Neon prod, the median
// layer file size is much smaller than the compaction target size.
// We could be better here, e.g., sum of all L0 layers + most recent L1 layer.
// That's what's typically used by the various background loops.
//