4 Replies Latest reply on Feb 12, 2009 10:56 PM by mattzyzy

    JBoss WebServer 2.11GA memory setting help

    mattzyzy

      Where do I need to configure in JBoss WebServer 2.11GA with APR connector enabled for the memory related settings ( -Xms / -Xmx / -XX:MaxNewSize / -XX:NewSize / -XX:MaxPermSize )

      I am using 64-bit Linux with session enable web app with 64bit mysql db

        • 1. Re: JBoss WebServer 2.11GA memory setting help
          peterj

          Edit bin/catalina.sh, and set JAVA_OPTS early in the file (there are no heap size setting in that file, or at least I didn't see one, so there is no line to edit as in other run scripts)

          • 2. Re: JBoss WebServer 2.11GA memory setting help
            mattzyzy

            Thanks , it works .

            my JVM status now shows
            Free memory: 204.15 MB
            Total memory: 245.37 MB
            Max memory: 245.37 MB

            A trivial question I guess where to now the permgen status?

            • 3. Re: JBoss WebServer 2.11GA memory setting help
              peterj

              Operating system tools are useless for determining JVM memory usage. The numbers that you printed include (most of the) heap, permgen, the binary code needed to run the JVM, the stacks and other misc non-Java stuff.

              If you want to know what is really going on use a tool such a jconsole of virtualvm. Those tools connect to a running JVM and can report heap and permgen usage.

              • 4. Re: JBoss WebServer 2.11GA memory setting help
                mattzyzy

                Another question ,
                Which is the prefered way of setting the memory setting in jbossweb as a service using etc/init.d/ script, either using CATALINA_OPTS="-Xms256M -Xmx1000M" or the setting JAVA_OPTS in bin/catalina.sh ?

                I also sometime saw somewhere the CATALINA_OPTS being set in the bash profile environment file. Of course , in start as a service /auto start on boot context.