Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Heap Space setup in RHEL 6

 
Khalid Mahamud
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using tomcat server in a RHEL 6 sever with 16GB RAM.

But I don't know how to setup heap space in JAVA_OPTS in Linux.

I also need to what should the maximum size of my server.

I am using BIRT report. When multiple user want run same report or multiple report concurrently then report server are not responding. why this happening. I think maximum report highly big sql related. and time required.

please give me advice ASAP.

For your kind information I am very Beginner in this field.

 
K. Gil
Ranch Hand
Posts: 75
Java Linux Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
just add extra line at the top of your "bin/catalina.sh" file:
export JAVA_OPTS="-Xms12G -Xmx12G"


 
Tim Holloway
Saloon Keeper
Pie
Posts: 18152
52
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
K. Gil wrote:just add extra line at the top of your "bin/catalina.sh" file:
export JAVA_OPTS="-Xms12G -Xmx12G"




Please don't. It isn't necessary, and if at all possible one should avoid modifying standard scripts. It makes them behave in unexpected ways, can possibly introduce problems in starting/stopping/controlling the service, and can be a royal nuisance when it's time to upgrade.

Tomcat has a place for stuff like this. Just create a file named "setenv.sh" (or setenv.sh, for Windows) and place the following line in it:



The setenv file goes in the TOMCAT_HOME/bin directory, just line the statup.sh and catalina.sh files do.

Note that if you really need to give Tomcat such a huge amount of RAM that you absolutely positively MUST be running the 64-bit JVM. The 32-bit JVM can't even begin to work with a heap that big.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic