summaryrefslogtreecommitdiff
path: root/src/btree
diff options
context:
space:
mode:
authorAlex Gorrod <alexander.gorrod@mongodb.com>2016-05-31 03:19:04 -0400
committerAlex Gorrod <alexander.gorrod@mongodb.com>2016-05-31 03:19:04 -0400
commit5a11406ae9d53674661cb305e269a02c2dd1c632 (patch)
tree57890052f91776c47196dabb186f707e7e66523d /src/btree
parent27981762bac2b4b1d854826f845866f4f523a270 (diff)
downloadmongo-5a11406ae9d53674661cb305e269a02c2dd1c632.tar.gz
WT-2673 Stop automatically increasing memory page max (#2760)
We used to ensure it was at least 50 times the leaf page size, enhancements to how we split pages mean that's no longer necessary. While reviewing the code adjust the maximum page size allowed to ten percent of the cache size. It is more reasonable for workloads with multiple tables, and should only be relevant when applications configure tiny caches.
Diffstat (limited to 'src/btree')
-rw-r--r--src/btree/bt_handle.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/btree/bt_handle.c b/src/btree/bt_handle.c
index ba545859d07..961eb4a1bea 100644
--- a/src/btree/bt_handle.c
+++ b/src/btree/bt_handle.c
@@ -689,22 +689,20 @@ __btree_page_sizes(WT_SESSION_IMPL *session)
"size (%" PRIu32 "B)", btree->allocsize);
/*
- * When a page is forced to split, we want at least 50 entries on its
- * parent.
- *
* Don't let pages grow larger than a quarter of the cache, with too-
* small caches, we can end up in a situation where nothing can be
* evicted. Take care getting the cache size: with a shared cache,
* it may not have been set.
*/
WT_RET(__wt_config_gets(session, cfg, "memory_page_max", &cval));
- btree->maxmempage =
- WT_MAX((uint64_t)cval.val, 50 * (uint64_t)btree->maxleafpage);
+ btree->maxmempage = cval.val;
if (!F_ISSET(conn, WT_CONN_CACHE_POOL)) {
if ((cache_size = conn->cache_size) > 0)
btree->maxmempage =
- WT_MIN(btree->maxmempage, cache_size / 4);
+ WT_MIN(btree->maxmempage, cache_size / 10);
}
+ /* Enforce a lower bound of a single disk leaf page */
+ btree->maxmempage = WT_MAX(btree->maxmempage, btree->maxleafpage);
/*
* Try in-memory splits once we hit 80% of the maximum in-memory page