Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-25889

Displaying the page authors footer and the tips panel blocks other requests under high load

    XMLWordPrintable

Details

    • Unknown

    Description

      Under high load, the page authors footer and the tips panel slow down every request that displays cached asynchronous content (panels, UI extensions, wiki macros with "Cached" enabled), although neither of them benefits from asynchronous rendering or from the cache.

      Page authors footer

      The "Created by … on …" footer of every page (XWiki.PageAuthorsUIX, extension point org.xwiki.platform.template.contentFooter) has "Asynchronous rendering" and "Cached" enabled, with the document reference, the locale, the user and the wiki as context. So every page viewed by every user creates its own entry in the cache of asynchronous rendering results:

      • With the default size of that cache (100 entries for the whole instance), on a wiki with many pages or crawlers, the footers keep evicting the content that benefits from the cache, such as panels.
      • Each miss starts an asynchronous job and then stores its result. Both take the write lock of the cache, which blocks every request that reads a cached result (see the linked issue about the contention on the async renderer cache).

      The footer only displays the creator's name and the creation date. The last modifier is already displayed without any cache, and the user profiles needed for the names come from the document cache. If displaying user names turns out to be expensive, a dedicated cache for user names would help every place that displays them.

      Tips panel

      The tips panel (Help.TipsPanel.WebHome, in the default right panels) has "Asynchronous rendering" enabled without "Cached". So every page view that displays it starts an asynchronous job, which takes the write lock of the cache, stores its result, and makes the browser send one more request to get it. The panel only displays a random tip, which is cheap to render inline.

      Observed

      During a load spike on xwiki.org (XWiki 18.4.x, CPU saturated), about 25% of the home page's request time was spent parked on the read lock of the async renderer cache, and 843 samples were writers waiting to store results.

      Proposal

      Disable "Asynchronous rendering" and "Cached" on XWiki.PageAuthorsUIX and "Asynchronous rendering" on Help.TipsPanel.WebHome.

      Workaround: edit these pages (in each wiki for XWiki.PageAuthorsUIX) and set these properties to No.

      Attachments

        Issue Links

          Activity

            People

              MichaelHamann Michael Hamann
              MichaelHamann Michael Hamann
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: