High finalizer overhead in heap from org.apache.cxf.jaxws.JaxWsClientProxy
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.JaxWsClientProxyaccumulation 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
- In most cases, such Content from cxf.apache.org is not included.JaxWsClientProxy objects are thread safe so instead of recreating them at such high rates, you should cache and reuse them. This would avoid the build up of many JaxWsClientProxy objects pending finalization.
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.
SBR
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.