Performance test on Jetty/HSQLDB with a single wiki between 9.11.8 and 10.10
Environment
- Ubuntu 18.10 64b
- Quad core i7-8750H
- Oracle JDK 1.8.0_191 64b
- Dumbbench 0.111
- Yourkit 2018.04-b87
- standard jetty+hsqldb
- permdir in a SSD
- 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 cpanm Module::Install
$ sudo cpanm Dumbbench
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:
Tests
Summary
All the performance boosts are coming from the asynchronous rendering and caching of various elements of the skin. We need to analyze in details what is stored in the increased memory use but various new caches have been added so it's not suprising (notification preference cache, groups cache, cached skin elements). The degraded indexing speed will need to be analyzed too. Even if there are more documents to index in 10.10 (+3%), it's probably not enough to explain the x2 difference.
"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 | slightly faster | |
Reload | not existing page without UI | similar |
not existing page with UI | -30% | |
empty page without UI | similar | |
empty page with UI | -23% | |
Main.WebHome without UI | similar | |
Main.WebHome with UI | -20% | |
SOLR | Full SOLR reindex | similar |
SOLR sync when index is empty | x2 | |
SOLR sync when there is nothing to do | +23% | |
Result of search finding lots of results | slightly faster | |
Result of search finding one result | slightly faster | |
Rendering | Page with 1000 macros without UI | similar |
Page with 1000 html macros without UI | similar | |
Wiki creation | From flavor | slightly slower |
From template | slightly slower |
Memory
Actions | Difference |
---|---|
Heap Memory after jetty startup | +8M used |
Heap Memory after full SOLR index | +23M |
Jetty startup
Unit: seconds
You get this from the log with the line looking like 2016-10-19 16:52:25.309:INFO:oejs.Server:main: Started @8434ms.
- 9.11.8: 7707
- 10.10: 7988
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).
- 9.11.8: 4893
- 10.10: 4648
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).
- 9.11.8: 10
- 10.10: 9
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
Unit: milliseconds
- 9.11.8: 5
- 10.10: 5
Reload of not existing page with UI
Unit: milliseconds
- 9.11.8: 96
- 10.10: 68
Reload of empty page without UI
Unit: milliseconds
- 9.11.8: 4
- 10.10: 4
Reload of empty page with UI
Unit: milliseconds
- 9.11.8: 90
- 10.10: 69
Reload of Main.WebHome without UI
Unit: milliseconds
- 9.11.8: 6
- 10.10: 6
Reload of Main.WebHome with UI
Unit: milliseconds
- 9.11.8: 89
- 10.10: 71
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 Yourkit (Yourkit is slowing down a bit all that but what is important is the difference anyway).
- 9.11.8: 172
- 10.10: 180
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
- 9.11.8: 1388519706
- 10.10: 2860309938
when there is nothing to do
Unit: nanoseconds
- 9.11.8: 583027285
- 10.10: 721834804
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.
- 9.11.8: 172
- 10.10: 150
Result of search finding one result
- 9.11.8: 126
- 10.10: 106
Rendering
Page with 1000 macros without UI
Unit: milliseconds
- 9.11.8: 60
- 10.10: 56
Page with 1000 html macros without UI
Unit: milliseconds
- 9.11.8: 800
- 10.10: 804
Wiki creation
Unit: nanoseconds
From flavor
Create the wiki test1 from default flavor and get the time spend from the job (</rootStep> in <permdir>/jobs/status/wikicreation/createandinstall/test1/status.xml).
- 9.11.8: 11789359234
- 10.10: 12999789138
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).
- 9.11.8: 15814358918
- 10.10: 18655438361
Heap Memory
Attach Yourkit 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".
- 9.11.8: 63 used, 546 allocated
- 10.10: 71 used, 497 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
- 9.11.8: 198 used, 822 allocated
- 10.10: 221 used, 755 allocated