Uploaded image for project: 'genius'
  1. genius
  2. GENIUS-240

IdPoolListener equals() on DataObject seems to cause huge object allocation overhead

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Medium Medium
    • Oxygen-SR4, Fluorine-SR2, Neon
    • Oxygen-SR3
    • None
    • None

      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

            ankit.ericsson Ankit Jain
            vorburger Michael Vorburger
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: