Skip to content
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
7 changes: 3 additions & 4 deletions crates/table/src/page_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,15 @@ impl PagePool {
/// if no size is provided, a default of 1 page is used.
pub fn new(max_size: Option<usize>) -> Self {
const PAGE_SIZE: usize = size_of::<Page>();
// TODO(centril): This effectively disables the page pool.
// Currently, we have a test `test_index_scans`.
// TODO(centril): Currently, we have a test `test_index_scans`.
// The test sets up a `Location` table, like in BitCraft, with a `chunk` field,
// and populates it with 1000 different chunks with 1200 rows each.
// Then it asserts that the cold latency of an index scan on `chunk` takes < 1 ms.
// However, for reasons currently unknown to us,
// a large page pool, with capacity `1 << 26` bytes, on i7-7700K, 64GB RAM,
// will turn the latency into 30-40 ms.
// As a precaution, we disable the page pool by default.
const DEFAULT_MAX_SIZE: usize = PAGE_SIZE; // 1 page
// As a precaution, we use a smaller page pool by default.
const DEFAULT_MAX_SIZE: usize = 128 * PAGE_SIZE; // 128 pages

let queue_size = max_size.unwrap_or(DEFAULT_MAX_SIZE) / PAGE_SIZE;
let inner = Arc::new(PagePoolInner::new(queue_size));
Expand Down
Loading