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

fix(memory): increase reserved mem to 30% #13648

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/compute/src/memory/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub const MIN_COMPUTE_MEMORY_MB: usize = 512;
/// overhead, network buffer, etc.) in megabytes.
pub const MIN_SYSTEM_RESERVED_MEMORY_MB: usize = 512;

const SYSTEM_RESERVED_MEMORY_PROPORTION: f64 = 0.2;
const SYSTEM_RESERVED_MEMORY_PROPORTION: f64 = 0.3;

const STORAGE_MEMORY_PROPORTION: f64 = 0.3;

Expand Down Expand Up @@ -157,14 +157,14 @@ mod tests {
#[test]
fn test_reserve_memory_bytes() {
// at least 512 MB
KeXiangWang marked this conversation as resolved.
Show resolved Hide resolved
let (reserved, non_reserved) = reserve_memory_bytes(2 << 30);
let (reserved, non_reserved) = reserve_memory_bytes(1536 << 20);
assert_eq!(reserved, 512 << 20);
assert_eq!(non_reserved, 1536 << 20);
assert_eq!(non_reserved, 1024 << 20);

// reserve based on proportion
let (reserved, non_reserved) = reserve_memory_bytes(10 << 30);
assert_eq!(reserved, 2 << 30);
assert_eq!(non_reserved, 8 << 30);
assert_eq!(reserved, 3 << 30);
assert_eq!(non_reserved, 7 << 30);
}

#[test]
Expand Down
Loading