-
Type: Task
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
3
-
Storage - Ra 2020-07-13
We can possibly make splits more efficient by forcing a page to split when there are more than a certain number of updates on it. This would be useful in cases where there are a huge number of predominantly small updates on a page being made. michael.cahill reported that the following change offers some performance improvement:
--- a/src/include/reconcile.i +++ b/src/include/reconcile.i @@ -197,6 +197,21 @@ __rec_page_time_stats(WT_SESSION_IMPL *session, WT_RECONCILE *r) static inline bool __wt_rec_need_split(WT_RECONCILE *r, size_t len) { + /* + * In the case of a row-store leaf page, trigger a split if a threshold number of saved updates + * is reached. This allows pages to split for update/restore and history store eviction when + * there is no visible data causing the disk image to grow. + * + * In the case of small pages or large keys, we might try to split when a page has no updates or + * entries, which isn't possible. To consider update/restore or history store information, + * require either page entries or updates that will be attached to the image. The limit is one + * of either, but it doesn't make sense to create pages or images with few entries or updates, + * even where page sizes are small (especially as updates that will eventually become overflow + * items can throw off our calculations). Bound the combination at something reasonable. + */ + if (r->page->type == WT_PAGE_ROW_LEAF && r->entries + r->supd_next > 10) + len += r->supd_memsize / 10; + /* Check for the disk image crossing a boundary. */ return (WT_CHECK_CROSSING_BND(r, len)); }
- related to
-
WT-6444 Abort a transaction if it is force evicting and oldest
- Closed