Performance test on Jetty/HSQLDB with a single wiki between 11.10.13 and 12.10.8

Last modified by Ilie Andriuta on 2021/07/09 11:26

Environment

  • Windows 10 64bit version 21H1
  • Quad core i7-9750H
  • Oracle JDK 11.0.11
  • Dumbbench 0.501
  • VisualVM 2.0.7
  • standard jetty+hsqldb
  • permdir in a SSD
  • jetty/hsqldb package
  • only main wiki
  • configuration
    • Admin user:
      • hidden documents enabled
  • import perf.xar

Most of response time statistics are made with Dumbbench, you can install it using cpan.
For example on Debian/Ubuntu:

$ sudo apt-get install cpanminus
$ sudo cpanm Module::Install
$ sudo cpanm Dumbbench

On Windows 10:

  1. Install perl from https://strawberryperl.com/
  2. Go to Windows Terminal and install Dumbbench:
    PS C:\> perl
    PS C:\> cpanm Dumbbench
  3. (If needed) Download wget.exe (64 bit) from https://eternallybored.org/misc/wget/

    Make a folder for testing the instances and put wget.exe there.

Unless specifically indicated otherwise all the tests are executed with a fully initialized instance (core extensions don't run anymore, SOLR index is fully up to date, etc.) and logged in with Admin user. Basically except for a few special tests we are using an instance that already been started and run until the proc is flat for some time.

Login with Admin user (using port 1115):

.\wget.exe --save-cookies cookies.txt --post-data 'j_username=Admin&j_password=admin&j_rememberme=true' "http://127.0.0.1:1115/xwiki/bin/loginsubmit/XWiki/XWikiLogin?j_username=Admin&j_password=admin&j_rememberme=true"

Tests

Summary

"similar": difference is lower than 10%
"slightly": difference is lower than 20%

Information

Note that most of the speed related values are an average of very moving results, a lot of things is happening during a HTTP request and it's far from stable duration (that's why 10% may sounds a lot for something called "similar" but the variable can go up and down around 5% sometimes so 10% average is really not that much of a clear win). Dumbbench based tests are executed several times and the lowest result is selected.

Speed

ActionsDifference
Jetty startupslightly slower
First accessnot existing page without UIsimilar
not existing page with UI+10%
Reloadnot existing page without UI-25%
not existing page with UI-21%
empty page without UI-26%
empty page with UI-21%
Main.WebHome without UI-30%
Main.WebHome with UI-21%
SOLRFull SOLR reindex+20%
SOLR sync when index is emptysimilar
SOLR sync when there is nothing to dosimilar
Result of search finding lots of results-19%
Result of search finding one result-20%
RenderingPage with 1000 macros without UIsimilar
Page with 1000 html macros without UI-10%
Wiki creationFrom flavor+34%
From template-15%

Memory

ActionsDifference
Heap Memory after jetty startup+10
Heap Memory after full SOLR index+50

Jetty startup

Unit: milliseconds

You get this from the log with the line looking like 2016-10-19 16:52:25.309:INFO:oejs.Server:main: Started @8434ms.

  • 11.10.13: 27960
  • 12.10.8: 32707

First access

First HTTP request after restarting Jetty.

First access to not existing page without UI

(/xwiki/bin/get/NoSpace/NoPage)

Unit: milliseconds

Firefox network statistics to load the root resource (image/js/css/etc. resources are not taken into account).

  • 11.10.13: 11913
  • 12.10.8: 12835

First access to not existing page with UI

(/xwiki/bin/view/NoSpace/NoPage)

Unit: seconds

Done by hand with a chronometer (image/js/css/etc. resources are not taken into account).

  • 11.10.13: 20
  • 12.10.8: 22

Reload

XWiki is doing nothing on background and everything is both in server and client cache already. Values are calculated using dumbbench (image/js/css/etc. resources are not taken into account).

Reload of not existing page without UI

dumbbench --float -p 0.1 -i 100 -- wget -q -o NUL -O NUL --load-cookies cookies.txt "http://127.0.0.1:1115/xwiki/bin/get/NoSpace/NoPage"

Unit: milliseconds

  • 11.10.13: 8
  • 12.10.8: 6

Reload of not existing page with UI

dumbbench --float -p 0.1 -i 100 -- wget -q -o NUL -O NUL --load-cookies cookies.txt "http://127.0.0.1:1115/xwiki/bin/view/NoSpace/NoPage"

Unit: milliseconds

  • 11.10.13: 63.34
  • 12.10.8: 49.77

Reload of empty page without UI

dumbbench --float -p 0.1 -i 100 -- wget -q -o NUL -O NUL --load-cookies cookies.txt "http://127.0.0.1:1115/xwiki/bin/get/EmptySpace/EmptyPage"

Unit: milliseconds

  • 11.10.13: 7.6
  • 12.10.8: 5.6

Reload of empty page with UI

dumbbench --float -p 0.1 -i 100 -- wget -q -o NUL -O NUL --load-cookies cookies.txt "http://127.0.0.1:1115/xwiki/bin/view/EmptySpace/EmptyPage"

Unit: milliseconds

  • 11.10.13: 81.8
  • 12.10.8: 64.3

Reload of Main.WebHome without UI

dumbbench --float -p 0.1 -i 100 -- wget -q -o NUL -O NUL --load-cookies cookies.txt "http://127.0.0.1:1115/xwiki/bin/get/Main/WebHome"

Unit: milliseconds

  • 11.10.13: 8.2
  • 12.10.8: 5.7

Reload of Main.WebHome with UI

dumbbench --float -p 0.1 -i 100 -- wget -q -o NUL -O NUL --load-cookies cookies.txt "http://127.0.0.1:1115/xwiki/bin/view/Main/WebHome"

Unit: milliseconds

  • 11.10.13: 81.9
  • 12.10.8: 64.6

SOLR

Full SOLR reindex

Unit: seconds

Delete the data/solr folder, restart, load home page and calculate the time of activity of the SOLR index thread using VisualVM (XWiki Solr index thread from Threads Tab > Running column, after it's parked).

  • 11.10.13: 130
  • 12.10.8: 156

SOLR sync

Only the thread determining what need to be indexed and not the actual indexing.

<perm dir>/data/jobs/status/solr/indexer/status.xml

when index is empty

Unit: nanoseconds

  • 11.10.13: 815703100
  • 12.10.8: 860021100

when there is nothing to do

Unit: nanoseconds

  • 11.10.13: 364940000
  • 12.10.8: 396986300

Search

XWiki is doing nothing on background and everything is both in server and client cache already. Values are calculated using dumbbench (image/js/css/etc. resources are not taken into account).

Unit: milliseconds

Result of search finding lots of results

Login with Admin user and make sure hidden document display is enabled.

dumbbench --float -p 0.1 -i 100 -- wget -q -o NUL -O NUL --load-cookies cookies.txt """http://127.0.0.1:1115/xwiki/bin/view/Main/Search?sort=score&sortOrder=desc&r=1&f_type=DOCUMENT&text=*"""
  • 11.10.13: 95
  • 12.10.8: 77

Result of search finding one result

dumbbench --float -p 0.1 -i 100 -- wget -q -o NUL -O NUL --load-cookies cookies.txt """http://127.0.0.1:1115/xwiki/bin/view/Main/Search?sort=score&sortOrder=desc&r=1&f_type=DOCUMENT&text=name%3A1000Macros"""
  • 11.10.13: 84
  • 12.10.8: 67

Rendering

Page with 1000 macros without UI

dumbbench --float -p 0.1 -i 100 -- wget -q -o NUL -O NUL --load-cookies cookies.txt "http://127.0.0.1:1115/xwiki/bin/get/Test/1000Macros"

Unit: milliseconds

  • 11.10.13: 13
  • 12.10.8: 12

Page with 1000 html macros without UI

dumbbench --float -p 0.1 -i 100 -- wget -q -o NUL -O NUL --load-cookies cookies.txt "http://127.0.0.1:1115/xwiki/bin/get/Test/1000HTMLMacros"

Unit: milliseconds

  • 11.10.13: 206.9
  • 12.10.8: 185.1

Wiki creation

Unit: nanoseconds

From flavor

Create the wiki test1 from default flavor and get the time spent from the job (</rootStep> in <permdir>/jobs/status/wikicreation/createandinstall/test1/status.xml).

  • 11.10.13: 17088538500
  • 12.10.8: 22922654000

From template

Make test1 a template wiki.

Create the wiki test2 from wiki test1 and get the time spend from the job (</rootStep> in <permdir>/jobs/status/wikicreation/createandinstall/test2/status.xml).

  • 11.10.13: 24570922000
  • 12.10.8: 20758772800

Heap Memory

Attach VisualVM to get the information.

Unit: MB

Heap Memory after jetty startup

Start jetty and wait until Java is not doing anything on both (wait for potential initialization of various stuff like core extension cache, etc). Force garbage collector before looking at "used".

  • 11.10.13: 84 used, 293 allocated
  • 12.10.8: 94 used, 329 allocated

Heap Memory after full SOLR index

Delete the data/solr folder, restart, load home page then wait until nothing is happening in background. Force garbage collector before looking at "used".

Unit: MB

  • 11.10.13: 212 used, 534 allocated
  • 12.10.8: 262 used, 534 allocated

Get Connected