5 Replies Latest reply on Feb 18, 2015 11:18 AM by Yulian Oifa

    Memory usage with wildfly

    Yulian Oifa Newbie

      Hello to all

      While checking memory usage over java tools , jboss-cli , or web management i see that memory usage is normal.

      memory_usage.png

       

      However linux memory status shows me completely different situation,

      From top command it uses around 4GB of memory:

      1334 wildfly   20   0 15.0g 3.9g  19m S  7.6 52.8  96:31.78 java

       

      From ps aux same :

      wildfly   1334  7.9 52.7 15713836 4064544 ?

       

      Same with vmstat, memory usage is increasing all the time for java process while its not seen on any java commands.

      There is nothing else running on that server.In the end of all wildfly server stops responding to timers , and finally simply freezes.

      What could lead to such a behavior , where all the memory goes?

      Best regards

      Yulian Oifa

        • 1. Re: Memory usage with wildfly
          Tomaz Cerar Master

          This is possible as there is code that uses off heap memory allocation, but it is still limited.

          What is the version of WildFly?

           

          also can you post configuration of IO and undertow subsystems

          • 2. Re: Re: Memory usage with wildfly
            Yulian Oifa Newbie

            Hello

            I am using 8.1.0 Final

            Undertow :

            <subsystem xmlns="urn:jboss:domain:undertow:1.1">

                        <buffer-cache name="default"/>

                        <server name="default-server">

                            <http-listener name="default" socket-binding="http"/>

                            <https-listener name="default-https" socket-binding="https" security-realm="SSLRealm"/>

                            <host name="default-host" alias="localhost">

                                <location name="/" handler="welcome-content"/>

                                <filter-ref name="server-header"/>

                                <filter-ref name="x-powered-by-header"/>

                            </host>

                        </server>

                        <servlet-container name="default">

                            <jsp-config/>

                        </servlet-container>

                        <handlers>

                            <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>

                        </handlers>

                        <filters>

                            <response-header name="server-header" header-name="Server" header-value="WildFly/8"/>

                            <response-header name="x-powered-by-header" header-name="X-Powered-By" header-value="Undertow/1"/>

                        </filters>

                    </subsystem>

             

             

            IO:

            <subsystem xmlns="urn:jboss:domain:io:1.1">

                        <worker name="default"/>

                        <buffer-pool name="default"/>

                    </subsystem>

             

            I am using following on server : HornetQ for messaging , Netty for UDP server , several standalone EJBs , Jax-RS rest services , Thrift connections to casandra , mongo java for mongo.

            Thanks and best regards

            Yulian Oifa

            • 3. Re: Re: Memory usage with wildfly
              Tomaz Cerar Master

              Before we move on, please upgrade to 8.2 as there was a memory leak in off heap memory allocation in 8.1.

              • 4. Re: Memory usage with wildfly
                Yulian Oifa Newbie

                Hello

                It looks much better now , i see much more aggressive GC ( memory usage is jumping ) , however it is in normal limits ( around 1 up to 1.2GB used ) with a bit higher CPU usage.

                I will monitor memory usage till tomorrow to verify that its indeed solved the issue.

                Thanks and best regards

                Yulian Oifa

                • 5. Re: Memory usage with wildfly
                  Yulian Oifa Newbie

                  Hello

                  Unfortunately the server behaviour is same as previously. Initially it kept some time on same memory usage , however the started to grow up.Current usage is 1.6 GB of memory for java process , while jmap and management console shows that there is 1.1 GB allocated , and 450MB from that used.

                  memory_usage.png

                   

                  Top :
                  12738 wildfly   20   0 8808m 1.6g  19m S 11.6 21.4  22:43.46 java

                   

                  Best regards

                  Yulian Oifa