Announcement Announcement Module
Collapse
No announcement yet.
how: this configuration for linux Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

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

    Comment


    • #3
      it is maybe in /etc/init.d/ ?
      it is not 100% linux related
      it is in the scripts (.sh) for tomcat

      Comment


      • #4
        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.

        Comment


        • #5
          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

          Comment


          • #6
            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.

            Comment


            • #7
              Hi Igor

              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.
              thats better for JAVA_OPTS in the same catalina.sh, now all works fine

              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.
              thanks for the advice, usually for intial heap i use 128MB and for the filed 999MB
              (i have 2-3 gb ram in 2 machines)

              thanks for your time

              best wishes

              Comment

              Working...
              X