High finalizer overhead in heap from org.apache.cxf.jaxws.JaxWsClientProxy

Solution Unverified - Updated

Environment

  • JBoss Enterprise Application Platform (EAP) 7.x

Issue

  • We reached a point of high heap and poor GC performance. The heap dump shows org.apache.cxf.jaxws.JaxWsClientProxy accumulation contributed a lot of Finalizer overhead:
Class Name                           | Objects | Shallow Heap |    Retained Heap
---------------------------------------------------------------------------------
java.lang.ref.Finalizer              |  25,984 |    1,039,360 | >= 1,979,456,752
org.apache.cxf.jaxws.JaxWsClientProxy|  12,626 |      404,032 | >= 1,978,300,096
---------------------------------------------------------------------------------

Resolution

Root Cause

  • This can occur if your app repeatedly creates such JaxWsClientProxy for requests, which isn't best. If their generation outpaces other activity in heap triggering GC, then this can run into a situation where most the heap is consumed by these pending finalizers so that any GC to try to clear so many of them becomes quite expensive.
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.