Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Linux by (18.4k points)

I work on my Ubuntu desktop machine and I'd like to increase my heap size of Java. The RAM is 16GB and this current Max Heap Size is 3GB

So I tried this command:

java -Xmx10000m -X2000m -XshowSettings:all

and the result is:

Min Heap Size: 1.95G

Max Heap Size: 9.77G

then sudo gedit /etc/tomcat7/default

and changed the line to:

JAVA_OPTS="-Djava.awt.headless=true -Xmx10000m -XX:MaxPermSize=2000m" 

but when I restarted my machine and checked my max size using:

java -XshowSettings:all

and it shows:

Max Heap Size (Estimated): 3.80GB

I wanted to take advantage of the high RAM I got (16 GB). Is there anything else I can do?

1 Answer

0 votes
by (36.8k points)

Changing your Tomcat config won't affect all the JVM instances to get those settings. This is not how it works, this setting will be used only to launch the JVMs used by the Tomcat, not started in your shell.

Want to be a Linux expert? Come and join this Linux course

Related questions

0 votes
1 answer
0 votes
2 answers
0 votes
1 answer
0 votes
2 answers

1.2k questions

2.7k answers

501 comments

693 users

Browse Categories

...