Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(lru): use sequence-based eviction policy instead of epoch-based #15928

Closed
wants to merge 11 commits into from
Closed
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ignored = ["workspace-hack"]
normal = ["workspace-hack"]

[dependencies]
ahash = "0.8"
anyhow = "1"
arc-swap = "1"
arrow-array = { workspace = true }
Expand Down Expand Up @@ -48,6 +49,7 @@ fixedbitset = "0.5"
foyer = { workspace = true }
futures = { version = "0.3", default-features = false, features = ["alloc"] }
governor = { version = "0.6", default-features = false, features = ["std"] }
hashbrown = "0.14"
hex = "0.4.3"
http = "0.2"
humantime = "2.1"
Expand Down
24 changes: 24 additions & 0 deletions src/common/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,15 @@ pub struct StreamingDeveloperConfig {
#[serde(default = "default::developer::memory_controller_threshold_stable")]
pub memory_controller_threshold_stable: f64,

#[serde(default = "default::developer::memory_controller_eviction_factor_aggressive")]
pub memory_controller_eviction_factor_aggressive: f64,

#[serde(default = "default::developer::memory_controller_eviction_factor_graceful")]
pub memory_controller_eviction_factor_graceful: f64,

#[serde(default = "default::developer::memory_controller_eviction_factor_stable")]
pub memory_controller_eviction_factor_stable: f64,

#[serde(default = "default::developer::stream_enable_arrangement_backfill")]
/// Enable arrangement backfill
/// If true, the arrangement backfill will be disabled,
Expand Down Expand Up @@ -1566,12 +1575,27 @@ pub mod default {
pub fn memory_controller_threshold_aggressive() -> f64 {
0.9
}

pub fn memory_controller_threshold_graceful() -> f64 {
0.8
}

pub fn memory_controller_threshold_stable() -> f64 {
0.7
}

pub fn memory_controller_eviction_factor_aggressive() -> f64 {
2.0
}

pub fn memory_controller_eviction_factor_graceful() -> f64 {
1.5
}

pub fn memory_controller_eviction_factor_stable() -> f64 {
1.0
}

pub fn stream_enable_arrangement_backfill() -> bool {
true
}
Expand Down
1 change: 1 addition & 0 deletions src/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ pub use risingwave_common_metrics::{
register_guarded_histogram_vec_with_registry, register_guarded_int_counter_vec_with_registry,
register_guarded_int_gauge_vec_with_registry,
};
pub mod lru;
pub mod opts;
pub mod range;
pub mod row;
Expand Down
Loading
Loading