4 Replies Latest reply on Jul 18, 2014 6:38 PM by Ralph Soika

    Bad Performance on Singleton Session EJBs ?

    Ralph Soika Apprentice

      Hi,

      I am just migrating from GlassFish to WildFly. Everything works great.

      But I recognized a bad performance from WildFly (8.0.0 Final) in compare to GlassFish (3.1.2) on my development machine (I am running on Linux with 64 Bit and 8GB RAM).

      I investigated some time in performance analyses and I came down that it could be something with the VM memory.

      For example: I usse a Singleton Session EJB. This bean uses a simple LinkedHashMap to cache some small user profile objects which I fetched from a database.

      (here is the source code on GitHub)

      When I call the EJB to get an object out from the cache (all objects are cached during my tests) it takes 5-20 ms running in WildFly.

      When I run the same code in GlassFish the same call only takes 1ms. This is really strange.

       

      So now I believe that something is wrong with my VM setup. I tried to configure both servers the same way.

      These are my VM Options I am currently using for WildFly:

       

      JAVA_OPTS:  -server -XX:+UseCompressedOops -Xms1024m -Xmx1024m -XX:MaxPermSize=256m -XX:NewRatio=2 -XX:PermSize=64m -XX:MaxNewSize=448m -XX:NewSize=448m -XX:SurvivorRatio=6 -XX:+UseLargePages -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true

       

      When I start WildFly I see the following message:

      OpenJDK 64-Bit Server VM warning: Failed to reserve shared memory (errno = 22).

       

      Did anybody had made same experience or any idea what I could try to get better performance?

      Thanks for any help.

       

      ===

      Ralph