Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-12325

Hot Rod server instances in tests use too much memory

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 12.0.0.Dev05
    • 12.0.0.Dev03
    • Server, Test Suite
    • None

    Description

      When a test class finishes, TestNG does not discard the test instance, instead it keeps it in memory until the test suite finishes. This means test class fields that uses a lot of memory will accumulate in memory, making the test suite use a lot more heap than it should.

      ISPN-8478 added a generic way to set Cache and EmbeddedCacheManager fields to null in order to reduce memory usage, but hotrod-client tests do not have anything similar for HotRodServer and RemoteCacheManager fields.

      That might need to change: hotrod-client tests often keep references to HotRodServer instances in fields, and the servers use > 3MB, most of it in the SerializationContextRegistryImpl:

      Class Name                                                                                                       | Shallow Heap | Retained Heap | Percentage
      -------------------------------------------------------------------------------------------------------------------------------------------------------------
      org.infinispan.client.hotrod.ReplTopologyChangeTest @ 0xc52bf018                                                 |           96 |    10,358,136 |      1.02%
      |- org.infinispan.server.hotrod.test.HotRodTestingUtil$1 @ 0xe30cc538                                            |          128 |     3,420,600 |      0.34%
      |  |- org.infinispan.marshall.protostream.impl.SerializationContextRegistryImpl @ 0xcd18d210                     |           24 |     2,493,584 |      0.25%
      |  |  |- org.infinispan.marshall.protostream.impl.SerializationContextRegistryImpl$MarshallerContext @ 0xe3d18c08|           32 |     2,358,320 |      0.23%
      |  |  |  |- org.infinispan.protostream.impl.SerializationContextImpl @ 0xe3d18e78                                |           64 |     2,357,696 |      0.23%
      |  |  |  |  |- org.infinispan.protostream.descriptors.FileDescriptor @ 0xe3d67fe0                                |           72 |       967,680 |      0.10%
      |  |  |  |  |  |- org.infinispan.protostream.descriptors.FileDescriptor @ 0xe41b8798                             |           72 |       690,528 |      0.07%
      |  |  |  |  |  |  |- org.infinispan.protostream.descriptors.FileDescriptor @ 0xc997eaf8                          |           72 |       413,376 |      0.04%
      |  |  |  |  |  |  |  |- org.infinispan.protostream.descriptors.FileDescriptor @ 0xc5ed3cd8                       |           72 |       214,640 |      0.02%
      |  |  |  |  |  |  |  |  |- org.infinispan.protostream.descriptors.FileDescriptor @ 0xc5ed4b60                    |           72 |       183,648 |      0.02%
      |  |  |  |  |  |  |  |  |  |- org.infinispan.protostream.descriptors.Descriptor @ 0xc5edabe8                     |           72 |       132,104 |      0.01%
      -------------------------------------------------------------------------------------------------------------------------------------------------------------
      

      Attachments

        Activity

          People

            dberinde@redhat.com Dan Berindei (Inactive)
            dberinde@redhat.com Dan Berindei (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: