Results 1 to 7 of 7

Thread: how: this configuration for linux

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Question how: this configuration for linux

    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

  2. #2

    Default

    Change your start script...
    it is maybe in /etc/init.d/ ?

  3. #3
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    it is maybe in /etc/init.d/ ?
    it is not 100% linux related
    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

  4. #4
    Join Date
    Dec 2005
    Location
    Croatia
    Posts
    192

    Default

    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:
    Code:
    set CATALINA_OPTS="-Xms256m -Xmx512m"
    You would normally put environment variable definition at the beginning of your catalina script. Hope this helps.

    Regards,
    Igor.

  5. #5
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    Hi Igor,

    thanks so much for the reply!

    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).
    thanks for the advice

    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.
    i start the tomcat with this command
    ./catalina.sh run
    or directly with eclipse with tomcatplugin

    In this script you can define java options using CATALINA_OPTS or JAVA_OPTS environment variables.
    yes, in catalina.sh i see both variables, but wondered what would be the difference between them (only the word stop for JAVA_OPTS )

    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.
    You would normally put environment variable definition at the beginning of your catalina script. Hope this helps.
    i will try


    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

  6. #6
    Join Date
    Dec 2005
    Location
    Croatia
    Posts
    192

    Default

    Quote Originally Posted by dr_pompeii View Post
    yes, in catalina.sh i see both variables, but wondered what would be the difference between them (only the word stop for JAVA_OPTS )
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •