hello guys
for this useful link
tomcat performance windows
http://computerlabsolutions.com/supp...hp#performance
the second step works fine for windows, the question is
how i can do this for linux??
thanks in advanced
hello guys
for this useful link
tomcat performance windows
http://computerlabsolutions.com/supp...hp#performance
the second step works fine for windows, the question is
how i can do this for linux??
thanks in advanced
- Manuel Jordan
Kill Your Pride, Share Your Knowledge With All
The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7
Blog
Technical Reviewer of Apress
- Pro SpringSource dm Server
- Spring Enterprise Recipes: A Problem-Solution Approach
- Spring Recipes: A Problem-Solution Approach, 2nd Edition
- Pro Spring Integration
- Pro Spring Batch
- Pro Spring 3
- Pro Spring MVC: With Web Flow
- Pro Spring Security
Change your start script...
it is maybe in /etc/init.d/ ?
it is not 100% linux relatedit is maybe in /etc/init.d/ ?
it is in the scripts (.sh) for tomcat
- Manuel Jordan
Kill Your Pride, Share Your Knowledge With All
The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7
Blog
Technical Reviewer of Apress
- Pro SpringSource dm Server
- Spring Enterprise Recipes: A Problem-Solution Approach
- Spring Recipes: A Problem-Solution Approach, 2nd Edition
- Pro Spring Integration
- Pro Spring Batch
- Pro Spring 3
- Pro Spring MVC: With Web Flow
- Pro Spring Security
Hi,
The configuration options you're mentioning are related to tomcat windows service. The "Initial memory pool" corresponds to the JVM -Xms option (initial java heap size), the "maximum memory pool" corresponds to the JVM -Xmx option (maximum java heap size).
I'm not using linux, so I don't know anything about the way you start Tomcat - probably using "startup.sh" script? If so, then take a look at the "catalina.sh" script - it is script that is being used by "startup.sh" and it is starting tomcat. In this script you can define java options using CATALINA_OPTS or JAVA_OPTS environment variables. Again, I'm not using linux, so I don't know how you define environment variable, but in windows you would do something like this:
You would normally put environment variable definition at the beginning of your catalina script. Hope this helps.Code:set CATALINA_OPTS="-Xms256m -Xmx512m"
Regards,
Igor.
Hi Igor,
thanks so much for the reply!
thanks for the adviceThe configuration options you're mentioning are related to tomcat windows service. The "Initial memory pool" corresponds to the JVM -Xms option (initial java heap size), the "maximum memory pool" corresponds to the JVM -Xmx option (maximum java heap size).
i start the tomcat with this commandIf so, then take a look at the "catalina.sh" script - it is script that is being used by "startup.sh" and it is starting tomcat.
./catalina.sh run
or directly with eclipse with tomcatplugin
yes, in catalina.sh i see both variables, but wondered what would be the difference between them (only the word stop for JAVA_OPTS )In this script you can define java options using CATALINA_OPTS or JAVA_OPTS environment variables.
Code:# CATALINA_OPTS (Optional) Java runtime options used when the "start", # or "run" command is executed. ..... more # JAVA_OPTS (Optional) Java runtime options used when the "start", # "stop", or "run" command is executed.i will tryYou would normally put environment variable definition at the beginning of your catalina script. Hope this helps.
thanks for your time
regards
- Manuel Jordan
Kill Your Pride, Share Your Knowledge With All
The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7
Blog
Technical Reviewer of Apress
- Pro SpringSource dm Server
- Spring Enterprise Recipes: A Problem-Solution Approach
- Spring Recipes: A Problem-Solution Approach, 2nd Edition
- Pro Spring Integration
- Pro Spring Batch
- Pro Spring 3
- Pro Spring MVC: With Web Flow
- Pro Spring Security
I'm not sure, but I would assume that JAVA_OPTS variable is used by all JVM (something like global JVM settings?), and CATALINA_OPTS just by tomcat's.
On the side note, be careful about setting heap sizes - in this case the bigger is not always the better. Large initial heap sizes will increase the work the garbage collector has to do with each run, which can impact application performance. Heap size should be set accordingly to your application needs, memory allocation and usage.
Regards.