[GENIUS-240] IdPoolListener equals() on DataObject seems to cause huge object allocation overhead Created: 13/Nov/18  Updated: 22/Nov/18  Resolved: 22/Nov/18

Status: Resolved
Project: genius
Component/s: None
Affects Version/s: Oxygen-SR3
Fix Version/s: Oxygen-SR4, Fluorine-SR2, Neon

Type: Bug Priority: Medium
Reporter: Michael Vorburger Assignee: Ankit Jain
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

I'm looking at a Java Flight Recording obtained from (internal) scale lab testing, based on Oxygen SR3 code, and thought it was curious / interesting that the second biggest "TLAB allocation" (85 GiB!) is the one below (top is OPNFLWPLUG-1047), long before and much bigger than other problems related to MDSAL and Akka, is the code path below, originating from genius.

I'm just wondering if IdPoolListener's update could be optimized - equals() on individual attributes instead of full DataObject?

ConcurrentHashMap$Node[] java.util.concurrent.ConcurrentHashMap.initTable()	16066
Object java.util.concurrent.ConcurrentHashMap.putVal(Object, Object, boolean)	16066
Object java.util.concurrent.ConcurrentHashMap.putIfAbsent(Object, Object)	16066
Object org.opendaylight.mdsal.binding.dom.codec.impl.LazyDataObject.getBindingData(Method)	16066
Object org.opendaylight.mdsal.binding.dom.codec.impl.LazyDataObject.invoke(Object, Method, Object[])	8543
Long com.sun.proxy.$Proxy169.getId()	7078
Object sun.reflect.GeneratedMethodAccessor495.invoke(Object, Object[])	7078
Object sun.reflect.DelegatingMethodAccessorImpl.invoke(Object, Object[])	7078
Object java.lang.reflect.Method.invoke(Object, Object[])	7078
boolean org.opendaylight.mdsal.binding.dom.codec.impl.LazyDataObject.bindingEquals(Object)	7078
Object org.opendaylight.mdsal.binding.dom.codec.impl.LazyDataObject.invoke(Object, Method, Object[])	7078
boolean com.sun.proxy.$Proxy169.equals(Object)	7078
boolean java.util.AbstractList.equals(Object)	7078
boolean java.util.Objects.equals(Object, Object)	7078
boolean org.opendaylight.mdsal.binding.dom.codec.impl.LazyDataObject.bindingEquals(Object)	7078
Object org.opendaylight.mdsal.binding.dom.codec.impl.LazyDataObject.invoke(Object, Method, Object[])	7078
boolean com.sun.proxy.$Proxy168.equals(Object)	7078
void org.opendaylight.genius.idmanager.IdPoolListener.update(IdPool, IdPool)	7078
void org.opendaylight.genius.idmanager.IdPoolListener.update(DataObject, DataObject)	7078
void org.opendaylight.serviceutils.tools.mdsal.listener.DataTreeChangeListenerActions.update(InstanceIdentifier, DataObject, DataObject)	7078
void org.opendaylight.serviceutils.tools.mdsal.listener.DataTreeChangeListenerActions.onDataTreeChanged(Collection, DataStoreMetrics)	7078
void org.opendaylight.serviceutils.tools.mdsal.listener.AbstractClusteredAsyncDataTreeChangeListener.lambda$onDataTreeChanged$0(Collection)	7078
void org.opendaylight.serviceutils.tools.mdsal.listener.AbstractClusteredAsyncDataTreeChangeListener$$Lambda$1177.355435203.run()	7078
void java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker)	7078
void java.util.concurrent.ThreadPoolExecutor$Worker.run()	7078
void java.lang.Thread.run()	7078


 Comments   
Comment by Michael Vorburger [ 19/Nov/18 ]

ankit.ericsson thanks for c/77766 .. will you also apply to Fluorine & Oxygen?

Generated at Wed Feb 07 20:00:16 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.