Tomcat java memory setting location

I’m looking for the proper java memory settings for tomcat.

I’m looking at /etc/tomcat/tomcat.conf " JAVA_OPTS" but i’m not sure if this is the right place to add the -Xms521m

I have found references to CATALINA_OPTS in other articles but not sure which one I should use in SUES.


I’m currently on SLES 12 SP3 with SuMA which runs tomcat, I see JAVA_OPT’s in use for this rather than CATALINA_OPTS;

tomcat.conf:JAVA_OPTS="-ea -Xms256m -Xmx1G …

ps -ef |grep tomcat
tomcat 1853 1 0 Oct28 ? 00:03:38 /etc/alternatives/jre/bin/java -ea -Xms256m …


I tried the setting (JAVA_OPT) in the /etc/tomcat/tomcat.conf and it had no effect, but I found a old article in the suse knowledge base and that seem to still work.

/etc/sysconfig/tomcat add CATALINA_OPT="-Xms256m -Xmx512m -Xss512k" (as an example) as a single line in the file without the export in front. This worked and gave me the expected results in the tomcat management page.

thanks for the help

Thank-you for posting back your results. I am pretty sure in the past
when I adjusted Tomcat I did so via the conf file too, but it may be that
in your case the conf file is managed via sysconfig files. Usually in
those cases the conf files themselves start with comments stating
something like, “Do not modify this file directory.” indicating it is
overwritten at runtime by something else.

Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below.

If you want to send me a private message, please let me know in the
forum as I do not use the web interface often.

Hello cisaksen,

we create a file in $Tomcat_Home/bin.
There you can also define the Java_Home variable.


export JAVA_HOME=/web/java/jdk1.8.0_151
export PATH=$PATH:$JAVA_HOME/bin

#Increase java heap size

#Enable JMX Remote port


Best Regards