Skip to content

Commit

Permalink
Increase free list cache sizes (#735)
Browse files Browse the repository at this point in the history
  • Loading branch information
rkuris authored Oct 10, 2024
1 parent 14d029c commit b1aad78
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions benchmark/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ struct GlobalOpts {
short = 'd',
required = false,
help = "Use this database name instead of the default",
value_name = "TRUNCATE",
default_value = PathBuf::from("benchmark_db").into_os_string(),
)]
dbname: PathBuf,
Expand All @@ -75,7 +74,6 @@ struct GlobalOpts {
short = 't',
required = false,
help = "Terminate the test after this many minutes",
value_name = "TRUNCATE",
default_value_t = 65
)]
duration_minutes: u64,
Expand Down Expand Up @@ -156,7 +154,7 @@ async fn main() -> Result<(), Box<dyn Error>> {
let mgrcfg = RevisionManagerConfig::builder()
.node_cache_size(args.cache_size)
.free_list_cache_size(
NonZeroUsize::new(2 * args.batch_size as usize).expect("batch size > 0"),
NonZeroUsize::new(4 * args.batch_size as usize).expect("batch size > 0"),
)
.max_revisions(args.revisions)
.build();
Expand Down
2 changes: 1 addition & 1 deletion firewood/src/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub struct RevisionManagerConfig {
#[builder(default_code = "NonZero::new(1500000).expect(\"non-zero\")")]
node_cache_size: NonZero<usize>,

#[builder(default_code = "NonZero::new(20000).expect(\"non-zero\")")]
#[builder(default_code = "NonZero::new(40000).expect(\"non-zero\")")]
free_list_cache_size: NonZero<usize>,
}

Expand Down

0 comments on commit b1aad78

Please sign in to comment.