Skip to content

Commit 64fccde

Browse files
nipunn1313Convex, Inc.
authored and
Convex, Inc.
committed
Fiddle with system table cleanup knobs based on experiments (#36134)
Lower chunk size gives better results for commit latency. p50 goes up a bit, p95 goes down a bit (seems good) GitOrigin-RevId: 081cddae0d1892efde73ac99c98a85052a02cde5
1 parent 532b194 commit 64fccde

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

crates/common/src/knobs.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -553,16 +553,15 @@ pub static SYSTEM_TABLE_CLEANUP_FREQUENCY: LazyLock<Duration> = LazyLock::new(||
553553

554554
/// Number of rows fetched and potentially deleted in a single transaction.
555555
pub static SYSTEM_TABLE_CLEANUP_CHUNK_SIZE: LazyLock<usize> =
556-
LazyLock::new(|| env_config("SYSTEM_TABLE_CLEANUP_CHUNK_SIZE", 256));
556+
LazyLock::new(|| env_config("SYSTEM_TABLE_CLEANUP_CHUNK_SIZE", 64));
557557

558558
/// Maximum number of rows deleted per second.
559559
/// This should not exceed the maximum rate that retention can process
560560
/// tombstones, which is about 300.
561-
/// TODO(lee) increase this back to 128
562561
pub static SYSTEM_TABLE_ROWS_PER_SECOND: LazyLock<NonZeroU32> = LazyLock::new(|| {
563562
env_config(
564563
"SYSTEM_TABLE_CLEANUP_ROWS_PER_SECOND",
565-
NonZeroU32::new(64).unwrap(),
564+
NonZeroU32::new(256).unwrap(),
566565
)
567566
});
568567

@@ -581,7 +580,7 @@ pub static MAX_SESSION_CLEANUP_DURATION: LazyLock<Option<Duration>> = LazyLock::
581580

582581
/// Number of concurrent commits to use for deleting session requests.
583582
pub static SESSION_CLEANUP_DELETE_CONCURRENCY: LazyLock<usize> =
584-
LazyLock::new(|| env_config("SESSION_CLEANUP_DELETE_CONCURRENCY", 1));
583+
LazyLock::new(|| env_config("SESSION_CLEANUP_DELETE_CONCURRENCY", 2));
585584

586585
/// Snapshots that expired more than this number of days ago are purged
587586
/// from storage.

0 commit comments

Comments
 (0)