Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-6487

Force pages to split in the case of lots of small updates on a page

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: WT3.2.2, 4.4.0-rc12, 4.7.0
    • Component/s: None
    • Labels:
      None
    • Story Points:
      3
    • Sprint:
      Storage - Ra 2020-07-13

      Description

      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));
       }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              alex.cameron Alex Cameron
              Reporter:
              alex.cameron Alex Cameron
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: