Performance test on Jetty/HSQLDB with a single wiki between 14.10.20 and 15.10.4
Environment
- Windows 11 64bit version 23H2
- Quad core i7-9750H
- Oracle JDK 21.0.1 (build 21.0.1+12-LTS-29)
- Dumbbench 0.503
- VisualVM 2.1.7
- permdir in a SSD
- standard Jetty/HSQLDB package
- only main wiki
- configuration:
- Admin user:
- hidden documents enabled
- Admin user:
- import
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 DumbbenchOn Windows 11:
- Install perl from https://strawberryperl.com/
- Go to Windows Terminal and install Dumbbench:
PS C:\> perl
PS C:\> cpanm Dumbbench (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%
Speed
| Actions | Difference | |
|---|---|---|
| Jetty startup | similar | |
| First access | not existing page without UI | similar |
| not existing page with UI | similar | |
| Reload | not existing page without UI | similar |
| not existing page with UI | similar | |
| empty page without UI | similar | |
| empty page with UI | similar | |
| Main.WebHome without UI | similar | |
| Main.WebHome with UI | similar | |
| SOLR | Full SOLR reindex | similar |
| SOLR sync when index is empty | slightly faster | |
| SOLR sync when there is nothing to do | similar | |
| Result of search finding lots of results | similar | |
| Result of search finding one result | similar | |
| Rendering | Page with 1000 macros without UI | similar |
| Page with 1000 html macros without UI | similar | |
| Wiki creation | From flavor | similar |
| From template | similar | |
Memory
| Actions | Difference |
|---|---|
| Heap Memory after jetty startup | -1 MB |
| Heap Memory after full SOLR index | +7 MB |
Jetty startup
Unit: milliseconds
This information is obtained from the log with the line looking like 2022-06-15 14:24:27.163:INFO :oejs.Server:main: Started Server@503d687a{STARTING}[10.0.7,sto=5000] @23806ms.
- 14.10.20: 21276
- 15.10.4: 22138
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).
- 14.10.20: 26322
- 15.10.4: 27518
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).
- 14.10.20: 31
- 15.10.4: 32
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
- 14.10.20: 280
- 15.10.4: 299
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
- 14.10.20: 282
- 15.10.4: 307
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
- 14.10.20: 33
- 15.10.4: 35
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
- 14.10.20: 345
- 15.10.4: 374
Results of tests for 15.10.4:
Test 1: 0.393820 (393 ms)
Test 2: 0.386430 (386 ms)
Test 3: 0.374520 (374 ms)
Test 4: 0.387050 (387 ms)
Test 5: 0.388040 (388 ms)
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
- 14.10.20: 41
- 15.10.4: 44
Results of tests for 15.10.4:
Test 1: 0.044990 (44 ms)
Test 2: 0.045920 (45 ms)
Test 3: 0.044880 (44 ms)
Test 4: 0.044970 (44 ms)
Test 5: 0.044370 (44 ms)
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
- 14.10.20: 396
- 15.10.4: 397
Results of tests for 15.10.4:
Test 1: 0.409400 (409 ms)
Test 2: 0.403380 (403 ms)
Test 3: 0.405600 (405 ms)
Test 4: 0.399070 (399 ms)
Test 5: 0.397840 (397 ms)
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).
- 14.10.20: 200
- 15.10.4: 209
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
- 14.10.20: 1899116500 (1.90 s)
- 15.10.4: 1630967100 (1.63 s)
when there is nothing to do
Unit: nanoseconds
- 14.10.20: 654974000 (654 ms)
- 15.10.4: 713905400 (713 ms)
Results of tests for 15.10.4:
Test 1: 757417000
Test 2: 713905400
Test 3: 788436600
Test 4: 727202700
Test 5: 735109200
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=*"""- 14.10.20: 579
- 15.10.4: 633
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"""- 14.10.20: 443
- 15.10.4: 478
Results of tests for 15.10.4:
Test 1: 0.488600 (488 ms)
Test 2: 0.486000 (486 ms)
Test 3: 0.479220 (479 ms)
Test 4: 0.478450 (478 ms)
Test 5: 0.480460 (480 ms)
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
- 14.10.20: 123
- 15.10.4: 130
Results of tests for 15.10.4:
Test 1: 0.130340 = (130 ms)
Test 2: 0.130920 = (130 ms)
Test 3: 0.130880 = (130 ms)
Test 4: 0.130550 = (130 ms)
Test 5: 0.130380 = (130 ms)
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
- 14.10.20: 524
- 15.10.4: 527
Results of tests for 15.10.4:
Test 1: 0.527220 (527 ms)
Test 2: 0.528640 (528 ms)
Test 3: 0.527080 (527 ms)
Test 4: 0.527280 (527 ms)
Test 5: 0.527480 (527 ms)
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).
- 14.10.20: 36773914500 (36 s)
- 15.10.4: 40055711900 (40 s)
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).
- 14.10.20: 38091000700 (38 s)
- 15.10.4: 41043414900 (41 s)
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".
- 14.10.20: 103 used, 178 allocated
- 15.10.4: 102 used, 178 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
- 14.10.20: 267 used, 909 allocated
- 15.10.4: 274 used, 940 allocated