(Confluence space import) prerequisites : where are Xmx Xms?

Still working on a test install, I am stumbling (and struggling) upon this prerequisite in Step 1 of the Confluence Migrator tool


At this step the minimal requirements for the migration are being listed.

XWiki should be set with very large memory settings, high cache:

  • Set -Xmx (7.8 GB) and -Xms (502 MB) to at least half the memory of the machine (1.7 for 3.4 GB RAM)

while in this page of the documentation : Confluence to XWiki migration guide: from export to customization - XWiki it does not appear.

I am confused because first I don’t know if it is needed, and secondly if needed I have no idea where to find it. I have tried using grep a bit everywhere in the Debian VM, in every place where xwiki has its files, but no luck.

Thanks for your kind help.


If you checked the mentioned page: blog about Confluence, there’s the line.

increase the memory allocated to your XWiki instance

And this points to configuration of memory as Performance (XWiki.org)

Thank you for pointing me in the right direction.

However, strangely we do not see the same thing, for some reason which I am unable to explain.
This page (Step 1)

does not contain the link you have provided me, be it in the paragraph

increase the memory allocated to your XWiki instance

or even in the whole page, I can’t find Performance (XWiki.org)

I have even done a search in the whole source code page, neither https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Performances/#HMemory nor Performance (high case for the ‘P’ character) or Performance (XWiki.org) was found.

Also, a suggestion, adding this link directly inside the Step 1 instructions provided in the Confluence migrator would be helpful.

I might have additional questions next, in new threads.

Now where should the attribute/value (such as the provided exemple) go?

CATALINA_OPTS="-server -Xms800m -Xmx1600m -Dfile.encoding=utf-8 -Djava.awt.headless=true -XX:+UseParallelGC -XX:MaxGCPauseMillis=100"

I have read about a setenv.sh file that should exist or be created, I have no clue if it is relevant here, nor where it should be installed.

I have browsed all directories in the Debian VM. My best guess would be to create one setenv.sh file under /usr/share/tomcat9/bin but what? Is that the right way?

I have also found a script named catalina.sh under /usr/share/tomcat9/bin/ where there seem to be options.

The comment states:

#   Do not set the variables in this script. Instead put them into a script
#   setenv.sh in CATALINA_BASE/bin to keep your customizations separate

Now I need to find which one is the *CATALINA_BASE* directory.

It would be nice to add this information to your documentation.

Thanks for your help.


Yes, that is the right place, you can cat catalina.sh to see the content of the file, especially CATALINA_OPTS section and which value is set by default or was set by you (if you’ve changed this file previously)

The value is -Xms and -Xmx.

I am reopening this thread for a related question.

We have migrated to Debian 12, from there the tomcat9 version was not available anymore, and the next is not yet compliant with XWiki, as I understand, so we switched to xjetty packages.

As the path to /usr/share/tomcat9/bin/ in our install is not related to the tomcat9 package anymore (but the setenv.sh file is still there), is there any place elsewhere in the system where it could be relevant to move it to?
Or is there another method with xjetty-xwiki-common?