5 Replies Latest reply on Sep 6, 2016 9:35 AM by nadirx

    JVM size

    stejas7

      Hello sebastian.laskawiec nadirx rvansa,

       

      1) How to set jvm size of each node(host)?

       

      2) How to set jvm size globally?

       

      3) How to check infinispan jvm size from command prompt / ispn-cli.bat ?

       

      4) How to set domain controller size 2gb and host controller size 4gb  ? (I have one domain controller.it has two host in cluster mode.)

       

      I am trying  to set jvm size in domain.xml using below xml configuration

       

      Domain.xml

       

          <server-groups>

            <server-group name="main-server-group" profile="default">

                <jvm name="default">

                    <heap size="2048m" max-size="2048m"/>

                </jvm>

                <socket-binding-group ref="clustered-sockets"/>

            </server-group>

          <server-groups>

       

      Host.xml

       

          <jvms>

              <jvm name="default">

                  <heap size="2048m" max-size="2048m"/>

                  <permgen size="2048m" max-size="2048m"/>

                  <jvm-options>

                      <option value="-server"/>

                  </jvm-options>

              </jvm>

          </jvms>

       

      5) if we already gives jvm size in domain.xml. Why its need in host.xml ?

       

         <servers>

              <servers>

                  <server name="server-one" group="cluster">

                            <jvm name="default"/>

                </server>

          </servers>

       

      Infinispan server domain.bat startup its show me 64m in JAVA_OPTS.

       

      ===============================================================================

        JBoss Bootstrap Environment

        JBOSS_HOME: "G:\HighQ-JBoss\infinispan-server-8.2.3.Final"

        JAVA: "C:\Program Files\Java\jdk1.8.0_71\bin\java"

        JAVA_OPTS: "-Xms64M -Xmx512M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -server"

      ===============================================================================

       

      6) i was change a jvm size 2048m in domain.xml but still its run with 64m? why java_opts show me size 64m ? is server-one running with 2048m ?

       

      Thanks,

      Tejas Shah

        • 1. Re: JVM size
          stejas7

          Somebody please help. nadirx could you? please?

          • 2. Re: JVM size
            nadirx

            JVM settings vary between the different types of server processes.

             

            • in standalone mode the settings are in bin/standalone.conf
            • in domain mode
              • the Domain/Host controllers (which don't need much memory) are configured via bin/domain.conf
              • the actual Servers will use either the specific configuration in host.xml (if present) or the one declared in domain.xml otherwise

             

            Please refer to the WildFly docs about this

            1 of 1 people found this helpful
            • 3. Re: JVM size
              stejas7

              Thanks nadirx

              • 4. Re: JVM size
                stejas7

                Hello nadirx

                 

                I am trying to check infinispan server-one size using WildFly docs about this

                but when i was enter the command in ispn-cli.bat.

                it will give me bellow error.

                 

                ispn-cli.bat

                 

                You are disconnected at the moment. Type 'connect' to connect to the server or '

                help' for the list of supported commands.

                [disconnected /] connect

                [domain@localhost:9990 /] /host=local/server-config=server-one/jvm=default:read-

                resource

                {

                    "outcome" => "failed",

                    "failure-description" => "WFLYCTL0030: No resource definition is registered

                for address [

                    (\"host\" => \"local\"),

                    (\"server-config\" => \"server-one\"),

                    (\"jvm\" => \"default\")

                ]",

                    "rolled-back" => true

                }

                [domain@localhost:9990 /]

                 

                 

                How to check infinispan size from ispn-cli.bat ??

                • 5. Re: JVM size
                  nadirx

                  Tejas,

                  the example implies that the host you are connecting to is called "local" in the configuration. In the default Infinispan config this will be "master". Also, again in the default configuration, the individual servers don't define a JVM size but inherit the one defined by the server group:

                   

                  [domain@localhost:9990 /] cd /host=master/server-config=server-one
                  [domain@localhost:9990 server-config=server-one] ls jvm
                  [domain@localhost:9990 server-config=server-one]
                  

                   

                  The above is empty. Let's look at the server group instead:

                  [domain@localhost:9990 /] cd server-group=cluster/jvm=default
                  [domain@localhost:9990 jvm=default] ls
                  agent-lib=undefined              heap-size=64m                    launch-command=undefined        stack-size=undefined           
                  agent-path=undefined            java-agent=undefined            max-heap-size=512m              type=undefined                 
                  env-classpath-ignored=undefined  java-home=undefined              max-permgen-size=undefined     
                  environment-variables=undefined  jvm-options=undefined            permgen-size=undefined
                  

                   

                  Let's change a couple of attributes:

                  [domain@localhost:9990 jvm=default] :write-attribute(name=heap-size,value=256m)
                  {
                      "outcome" => "success",
                      "result" => undefined,
                      "server-groups" => {"cluster" => {"host" => {"master" => {
                          "server-one" => {"response" => {
                              "outcome" => "success",
                              "response-headers" => {
                                  "operation-requires-restart" => true,
                                  "process-state" => "restart-required"
                              }
                          }},
                          "server-two" => {"response" => {
                              "outcome" => "success",
                              "response-headers" => {
                                  "operation-requires-restart" => true,
                                  "process-state" => "restart-required"
                              }
                          }}
                      }}}}
                  }
                  [domain@localhost:9990 jvm=default] :write-attribute(name=max-heap-size, value=1g)
                  {
                      "outcome" => "success",
                      "result" => undefined,
                      "server-groups" => {"cluster" => {"host" => {"master" => {
                          "server-one" => {"response" => {
                              "outcome" => "success",
                              "response-headers" => {
                                  "operation-requires-restart" => true,
                                  "process-state" => "restart-required"
                              }
                          }},
                          "server-two" => {"response" => {
                              "outcome" => "success",
                              "response-headers" => {
                                  "operation-requires-restart" => true,
                                  "process-state" => "restart-required"
                              }
                          }}
                      }}}}
                  }
                  

                   

                  Listing the node shows that the attributes have been changed:

                  [domain@localhost:9990 jvm=default] ls
                  agent-lib=undefined              heap-size=90m                    launch-command=undefined        stack-size=undefined           
                  agent-path=undefined            java-agent=undefined            max-heap-size=1g                type=undefined                 
                  env-classpath-ignored=undefined  java-home=undefined              max-permgen-size=undefined     
                  environment-variables=undefined  jvm-options=undefined            permgen-size=undefined         
                  

                   

                  Obviously, as stated in the response, a server restart will be required which you can do with:

                  [domain@localhost:9990 server-group=cluster] /server-group=cluster:restart-servers()
                  
                  1 of 1 people found this helpful