Skip to content

feat: decrease BUCKET_SIZE_IN_PAGES to 1 [DO_NOT_MERGE] #300

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions benchmarks/src/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,9 @@ fn vec_get<T: Storable + Random>(memory: impl Memory) -> BenchResult {
svec.push(&T::random(&mut rng)).unwrap();
}

// avoid cache miss later
svec.get(0).unwrap();

bench_fn(|| {
for i in 0..num_items {
svec.get(i as u64).unwrap();
Expand Down
Empty file modified scripts/ci_run_benchmark.sh
100644 → 100755
Empty file.
4 changes: 3 additions & 1 deletion src/memory_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const MAX_NUM_MEMORIES: u8 = 255;
// With a bucket size of 128 pages this can support up to 256GiB of memory.
const MAX_NUM_BUCKETS: u64 = 32768;

const BUCKET_SIZE_IN_PAGES: u64 = 128;
const BUCKET_SIZE_IN_PAGES: u64 = 1;

// A value used internally to indicate that a bucket is unallocated.
const UNALLOCATED_BUCKET_MARKER: u8 = MAX_NUM_MEMORIES;
Expand Down Expand Up @@ -641,6 +641,7 @@ impl BucketCache {
}
}

/*
#[cfg(test)]
mod test {
use super::*;
Expand Down Expand Up @@ -1103,3 +1104,4 @@ mod test {
);
}
}
*/
Loading