4 Replies Latest reply on Sep 5, 2016 11:39 PM by shonkylogic

    Host Controller and Process Controller heap size

    bstn_c

      In our current setup, we have several JBoss hosts running on the same Virtual Machine. Every host runs 1 to n servers, depending on the application.

       

      Example:

      appxhost has two servers: appx-core-server and appx-ws-server

       

      Since there are multiple JBoss hosts, for each host I start on the VM, I get a Process Controller and a Host Controller process. By default, they are using a max heap of 512MB and a permgen of 256MB

      The VMs are configured to have 10GB of RAM, and I would like to maximize the number of hosts I can run on those VMs. I was thinking about lowering the max heap of the host and process controllers and also the permgen. This can be done in the domain.conf if I'm not mistaken. (PROCESS_CONTROLLER_JAVA_OPTS and HOST_CONTROLLER_JAVA_OPTS which are currently configured to use the JAVA_OPTS="-Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000") Right now, I have an overhead of 1536MB on top of the configured heap of the application server itself and its permgen space. (1 host controller and 1 process controller)

       

      Is this possible? I mean; how low can I go without running into problems? Are there criteria I can take into account to calculate the necessary heap requirements for these controller processes?

        • 1. Re: Host Controller and Process Controller heap size
          emuckenhuber

          The process-controller shouldn't need that much memory for sure. The host-controller neither, however that also depends a bit if you are using a monitoring solution like RHQ / JON.

          2 of 2 people found this helpful
          • 2. Re: Host Controller and Process Controller heap size
            bstn_c

            Thanks for the response.

            I have decided to move away from the domain setup for now. The problem I had with it, is that all the profiles are located in the domain.xml and if I want to have for example a different datasource for each server, I had to create a different profile for each or make all the datasources available for all servers.

             

            So I am now working with standalone mode.

             

            My current problem is that it uses standalone.conf, where all the heap settings are specified, but I want to use only one set of JBoss binaries and use the externally located configurations for each server I start up.

            Problem is, it always uses the same standalone.conf so I am currently unable to set -Xmx or -Xms. According to the documentation (https://docs.jboss.org/author/display/AS7/Admin+Guide#AdminGuide-JVMsettings) it should be possible to use command-line arguments, but that is not the case. (also mentioned in this thread: https://community.jboss.org/message/634320)

             

            Does anybody have an idea on how to make it work? I don't want to run each application server with the same heap settings.

            • 3. Re: Host Controller and Process Controller heap size
              bstn_c

              I've solved it like this:

              - created a script file which sets the JAVA_OPTS

              - load that script (". /path/to/server.conf") in bash

              - then execute the standalone.sh

               

              So now each of my servers had a separate directory containing a server.conf file with the memory settings that gets loaded when I execute the start script.

              • 4. Re: Host Controller and Process Controller heap size
                shonkylogic

                I have a similar situation with multiple processes - domain controllers process controllers plus the instance on a VM where memory is tight. Are there any guidelines to indicate how much I can reduce this allocation?