mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-08 14:02:55 +00:00
fix(pageserver): compaction perftest wrt upper limit (#10564)
## Problem The config is added in https://github.com/neondatabase/neon/pull/10550 causing behavior change for l0 compaction. close https://github.com/neondatabase/neon/issues/10562 ## Summary of changes Fix the test case to consider the effect of upper_limit. Signed-off-by: Alex Chi Z <chi@neon.tech>
This commit is contained in:
@@ -1112,7 +1112,7 @@ impl Timeline {
|
||||
// Accumulate the size of layers in `deltas_to_compact`
|
||||
let mut deltas_to_compact_bytes = 0;
|
||||
|
||||
// Under normal circumstances, we will accumulate up to compaction_interval L0s of size
|
||||
// Under normal circumstances, we will accumulate up to compaction_upper_limit L0s of size
|
||||
// checkpoint_distance each. To avoid edge cases using extra system resources, bound our
|
||||
// work in this function to only operate on this much delta data at once.
|
||||
let delta_size_limit = self.get_compaction_upper_limit() as u64
|
||||
|
||||
@@ -75,6 +75,7 @@ def test_compaction_l0_memory(neon_compare: NeonCompare):
|
||||
# Initially disable compaction so that we will build up a stack of L0s
|
||||
"compaction_period": "0s",
|
||||
"gc_period": "0s",
|
||||
"compaction_upper_limit": 12,
|
||||
}
|
||||
)
|
||||
neon_compare.tenant = tenant_id
|
||||
@@ -91,6 +92,7 @@ def test_compaction_l0_memory(neon_compare: NeonCompare):
|
||||
tenant_conf = pageserver_http.tenant_config(tenant_id)
|
||||
assert tenant_conf.effective_config["checkpoint_distance"] == 256 * 1024 * 1024
|
||||
assert tenant_conf.effective_config["compaction_threshold"] == 10
|
||||
assert tenant_conf.effective_config["compaction_upper_limit"] == 12
|
||||
|
||||
# Aim to write about 20 L0s, so that we will hit the limit on how many
|
||||
# to compact at once
|
||||
|
||||
Reference in New Issue
Block a user