Skip to content

Commit

Permalink
Merge pull request #5003 from systeminit/fnichol/layer-cache-no-min-v…
Browse files Browse the repository at this point in the history
…alues

chore(layer-cache): remove minimum memory values
  • Loading branch information
fnichol authored Nov 20, 2024
2 parents 5edb941 + 6b18e84 commit 2aa840d
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/si-layer-cache/src/hybrid_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use crate::error::LayerDbResult;
use crate::LayerDbError;

const FOYER_DISK_CACHE_MINUMUM: u64 = 1024 * 1024 * 1024; // 1gb
const FOYER_MEMORY_CACHE_MINUMUM: u64 = 1024 * 1024 * 1024; // 1gb
const DEFAULT_MEMORY_RESERVED_PERCENT: u8 = 40;
const DEFAULT_MEMORY_USABLE_MAX_PERCENT: u8 = 100;
const DEFAULT_DISK_RESERVED_PERCENT: u8 = 5;
Expand Down Expand Up @@ -65,12 +64,7 @@ where
* (config.memory_usable_max_percent as f64 / 100.0))
.floor() as u64;

// Ensure that the computed value is at least as big as the Foyer minimum
max(
computed_memory_cache_capacity_bytes,
FOYER_MEMORY_CACHE_MINUMUM,
)
.try_into()?
computed_memory_cache_capacity_bytes.try_into()?
};

fs::create_dir_all(config.disk_path.as_path()).await?;
Expand Down

0 comments on commit 2aa840d

Please sign in to comment.