5 Replies Latest reply on Mar 16, 2015 10:33 AM by abhinav.gupta01

    Wildfly 8.1 Final - memory issue

    bikash9in

      Dear all,

      I am facing  problem with memory uses on wildfly. My servers are configured in domain mode with two virtual host instance on each server. Both servers are powered with 2 core xen processor with 8GB ram on each. when I start wildfly server as a service wildfly works well but consume about 7.4 GB ram on the server on start. while deployment of  any  project freezes the wildfly and we need to restart the wildfly service as a solutation and then deploy the same.


      I guess my config needs JVM heap size tune up, but unable to config so,

      Any ideas?

       

      If you need some other things (e.g. about the configuration or others) that can help to solve the problem, please ask

        • 1. Re: Wildfly 8.1 Final - memory issue
          abhinav.gupta01

          Can you please share your host.xml. I think you don't set any jvm properties for server instance. Just a wild guess.

          • 2. Re: Wildfly 8.1 Final - memory issue
            bikash9in

            Hi Abhinav,


            jvm properties for server instance with below details.


            On host JVM Settings -


            <jvms>

                    <jvm name="default">

                        <heap size="1024m" max-size="10240m"/>

                        <permgen size="1024m" max-size="10240m"/>

                        <jvm-options>

                            <option value="-server"/>

                        </jvm-options>

                    </jvm>

                </jvms>

             

            On master host JVM settings -


            <server-groups>

                    <server-group name="test-environmet" profile="full">

                        <jvm name="default">

                            <heap size="1024m" max-size="10240m"/>

                            <permgen size="512m" max-size="1024m"/>

                        </jvm>

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

                        <deployments>

                             <deployment name="Test.war" runtime-name="Test.war"/>

                        </deployments>

                    </server-group>

                    <server-group name="production-environment" profile="full-ha">

                        <jvm name="default">

                            <heap size="1024m" max-size="10240m"/>

                        </jvm>

                        <socket-binding-group ref="full-ha-sockets"/>

                        <deployments>

                            <deployment name="defaultapp.war" runtime-name="defaultapp.war"/>

                        /deployments>

                    </server-group>

                </server-groups>


            If  you suggest best JVM configs based on server specs in my old post



            • 3. Re: Wildfly 8.1 Final - memory issue
              ctomc

              Well, having max heap & premGen size set to 10GB will surely cause problems you see.

               

              As because of that GC wont be cleaning up memory until the limit is reached (and every time resize is done)

               

              in short, having 8GB of ram in server and setting potential maximum jvm memory settings to 20GB is a bad thing.

              • 4. Re: Wildfly 8.1 Final - memory issue
                bikash9in

                Hi Tomaz,

                 

                Thanks for the comment, can you please suggest how much memory will be right for jvm heap size is ideal for 8 GB server with two instances on wildfly also how much memory will be ideal for premgen too.

                • 5. Re: Wildfly 8.1 Final - memory issue
                  abhinav.gupta01

                  Hi Bikash,

                   

                  This really depends on your application, what are you planing to deploy on this servers. For example my application runs a complex data transformation process , and it need 12 GB Heap. To decide actual heap requirements you need to just start with scarce resources.

                  Now to start with , just leave default values for start or take 1 GB.

                   

                  <jvm name="default">

                            <heap size="64m" max-size="1024m"/>

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

                              <jvm-options>

                                  <option value="-server"/>

                              </jvm-options>

                         </jvm>

                   

                  and then start increasing it bases on your application. As Tomaz mentioned , if you give 12 GB as Heap , then GC was not triggered , causing issue for you.

                   

                  Also , I would suggest if you have 8 GB RAM on each node, you should not go more that 5.5 to 6 GB , you will need space for OS as well . If in other case your application demands more memory , prefer to increase RAM on your servers.