• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

running tomcat in linux for production

 
srini carry
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am planning to run tomcat for my production server deploy my app in tomcat, I have to make memory orptions are set well.

I want to specify memory arguments in catalina.sh




I will add this line is this all we need for more memory? Please advice me , I am also new bee to linux I dont want to set environment variables but just modifiy catalina.sh for memory arguments.Please advice.
 
tanuj khare
author
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Correct options is

JAVA_OPTS="-Xms1024m –Xmx1024m -XX:MaxPermSize=256m"
If you set both -Xms and -Xmx equal then, Application performance will increase, why you want use perm gen as 1024, my suggestion 256 is sufficient
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18098
50
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Forget modifying catalina.sh.

The catalina.sh script will look for a TOMCAT_HOME/bin/setenv.sh file and "source" it if it exists. If you put your JAVA_OPTS environment assignment there, you can get the same result without modifying your catalina.sh script (and possibly breaking it!).
 
srini carry
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is there anything more I should worry apart from memory settings ?
I will create datasources, set memeory, what more should I do to make it production servlet engine?
do I have to check if java.io.temp path has sufficient space etc ?

is there anything in them machine i have to check? , this will be running in linux.

 
Tim Holloway
Saloon Keeper
Pie
Posts: 18098
50
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depending on workload, you may not need to do anything at all. Tomcat's out-of-the-box configuration is pretty serviceable. The main things I have to tailor tend to be stuff like copying in the database drivers that I need to the TOMCAT_HOME/lib directory.

The only real way to tell is to set up stress testing that models what you're actually going to deploy and how people will be using it.

And yes, the disk drive that Tomcat's temp directory is located on should have a decent amount of free space, but usually that's not a lot of space required - unless a lot of people upload large files at the same time.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic