Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
18
rated 0 times [  18] [ 0]  / answers: 1 / hits: 61170  / 1 Year ago, fri, january 13, 2023, 5:18:17

I need to increase the default java heap size to get OpenNMS Linkd service running smoothly, and fortunately I have 4/5 of my total installed memory free at any given time even when their is maximum load on the server. still java is not performing to it's bast. hence I need to increase the default java heap size.



Can anyone tell me how to do it?



I'm using Ubuntu 12.04 lts & total memory installed is 16 GB out of which generally 2GB to 4GB is used.



I have already checked below questions and they did not help me resolve my issue.




  1. How to increase memory allocated to java? java.lang.OutOfMemoryError: Java heap space


  2. Comparing Virtual Memory Size with Resident Size


  3. How to increase memory allocated to java? java.lang.OutOfMemoryError: Java heap space




Please feel free to edit or comment for any additional details required.


More From » networking

 Answers
6

You could use java -Xmx4096m in order to set your heap to 4 GB.



you could then add export _JAVA_OPTIONS=-Xmx4096m to your shell by their (.bashrc, .zshrc) file.


[#22645] Saturday, January 14, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
fittecanap

Total Points: 322
Total Questions: 100
Total Answers: 105

Location: Israel
Member since Tue, Nov 17, 2020
4 Years ago
;