You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jspwiki.apache.org by Juan Pablo Santos Rodríguez <ju...@gmail.com> on 2022/07/20 16:13:14 UTC

Estimating memory requirements for JSPWiki

Hi,

some of the last pushes introduced a profile that allows to measure the
memory taken by different JSPWiki objects, which comes handy f.ex., if
trying to customize your cache. To activate it, from the root module,
execute

mvn test -Dtest=MemoryProfiling -pl jspwiki-main

(note that the test property with that specific value executes a test AND
activates a profile which loads a java agent, so the test can't be executed
standalone from an IDE - preceding maven execution is needed).

For the latest push, the execution yields the following numbers

===========================================================================================
Plain Engine, without pages/attachments, search indexes, references, etc.:
 4.898.192 bytes
Engine, with default set of wiki pages: ..................................
 5.579.008 bytes
Page: ....................................................................
   670.352 bytes
Attachment: ..............................................................
   671.368 bytes
Guest session on plain engine: ...........................................
   671.888 bytes
Acl: .....................................................................
       104 bytes
Acl entry: ...............................................................
       112 bytes
-------------------------------------------------------------------------------------------

Please note that this test doesn't take into account page contents or
attachments themselves, only their associated Page and Attachment java
objects. Also, the java agent loaded requires Java 8 to be run.

The second number should give a very good estimate of how much memory is
JSPWiki consuming on your (production) system, just tweak the test at [#1]
and share your numbers!


cheers,
juan pablo

[#1]:
https://github.com/apache/jspwiki/blob/master/jspwiki-main/src/test/java/org/apache/wiki/MemoryProfiling.java