Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-3355

Significant performance degradation while working with Entity beans

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.1.0.Final
    • 7.1.0.Final
    • EJB
    • None
    • Hide

      1. Deploy the application from the attached archive (build/appTest.ear).
      2. Use the JMeter load scenario from the archive (TestEntity.jmx) to put the system under the load – modify target host/port for 'HTTP Sampler' and run the test.

      Show
      1. Deploy the application from the attached archive (build/appTest.ear). 2. Use the JMeter load scenario from the archive (TestEntity.jmx) to put the system under the load – modify target host/port for 'HTTP Sampler' and run the test.

    Description

      We've run a series of performance tests on JBoss AS 7.1 (including latest nightly builds) and noticed a significant performance degradation while working with Entity EJBs under high load. Sample applications worked 2-5 times slower on 7.1 compared to 5.1 configuration. The most noticeable root cause for such results is related to garabage collector behavior on 7.1 - even minor GC pauses on 7.1 are much longer compared to 5.1 and amount of used memory in heap was also much higher. After looking on Java heap content, we've tracked the problem down to creation of EntityInstance object. As for now, AS 7.1 has no pool for entity beans (it's using InfinitePool, which actually creates new instance on every request). This results in huge amount of created EntityBeanComponentInstance objects. Every such object has non-trivial 'finalize' method, so it cannot be easily reclaimed by GC.

      I'm attaching archive with the sample application and simple Apache JMeter load scenario which can demonstrate the problem. The application contains simple Entity EJB (no working with DB, just stub methods) and single JSP page, which starts transaction and touch specified number of entity beans (200 per transaction in our test). We've done test with current 7.1 implementation and using hacked AS version with attached MaxStrictPool instead of InfinitePool for EntityBeanComponent.

      Here is the summary results for throughput of that sample application on tested environment (10 load threads, each request loads 200 entity beans, 50 ms wait time between requests):

      Configuration Throughput
      JBoss AS 5.1 133 req/s
      JBoss AS 7.1 (default) 66 req/s
      JBoss AS 7.1 (with pooling) 142,5 req/s

      Please, see also the GC logs collected during these runs. These results just illustrate the problem – on some other case we've got even worse results (you can try to reduce the wait time between requests in order to reproduce them).

      So, it seems that the observed performance degradation may be caused by missing of pooling implementation for entity beans in current 7.1 codebase.

      Attachments

        1. jb51-gc.log
          18 kB
        2. jb71-default-gc.log
          38 kB
        3. jb71-pooled-gc.log
          24 kB
        4. poolProblemTC.zip
          18 kB

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            alexeymakhmutov Alexey Makhmutov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: