Skip to content

Commit ade5858

Browse files
Re-enable page bool with default size of 128 pages (#2769)
1 parent f2a9657 commit ade5858

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

crates/table/src/page_pool.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,15 @@ impl PagePool {
3232
/// if no size is provided, a default of 1 page is used.
3333
pub fn new(max_size: Option<usize>) -> Self {
3434
const PAGE_SIZE: usize = size_of::<Page>();
35-
// TODO(centril): This effectively disables the page pool.
36-
// Currently, we have a test `test_index_scans`.
35+
// TODO(centril): Currently, we have a test `test_index_scans`.
3736
// The test sets up a `Location` table, like in BitCraft, with a `chunk` field,
3837
// and populates it with 1000 different chunks with 1200 rows each.
3938
// Then it asserts that the cold latency of an index scan on `chunk` takes < 1 ms.
4039
// However, for reasons currently unknown to us,
4140
// a large page pool, with capacity `1 << 26` bytes, on i7-7700K, 64GB RAM,
4241
// will turn the latency into 30-40 ms.
43-
// As a precaution, we disable the page pool by default.
44-
const DEFAULT_MAX_SIZE: usize = PAGE_SIZE; // 1 page
42+
// As a precaution, we use a smaller page pool by default.
43+
const DEFAULT_MAX_SIZE: usize = 128 * PAGE_SIZE; // 128 pages
4544

4645
let queue_size = max_size.unwrap_or(DEFAULT_MAX_SIZE) / PAGE_SIZE;
4746
let inner = Arc::new(PagePoolInner::new(queue_size));

0 commit comments

Comments
 (0)