Uploaded image for project: 'ovsdb'
  1. ovsdb
  2. OVSDB-469

Very high String allocation pressure on GC due to org.opendaylight.ovsdb.lib.notation.Version.fromString()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Highest Highest
    • Oxygen-SR3, Fluorine
    • None
    • None
    • None
    • Highest

      I was suprised to see the stack trace below as the top #3 memory allocator in the JFR from CONTROLLER-1864 showing up as 1 GB Total Allocation of String, that's a hell of a lot of objects for what org.opendaylight.ovsdb.lib.notation.Version.fromString() does!

      thapar or skitt or any other OVSDB maintainers, how about rewriting that simpler and without allocation?

      String java.lang.String.substring(int, int)	2558
      CharSequence java.lang.String.subSequence(int, int)	1653
      CharSequence java.util.regex.Matcher.getSubSequence(int, int)	1610
      String java.util.regex.Matcher.group(int)	1610
      Version org.opendaylight.ovsdb.lib.notation.Version.fromString(String)	1567
      Version org.opendaylight.ovsdb.lib.schema.typed.TyperUtils.getColumnUntilVersion(Method)	857
      void org.opendaylight.ovsdb.lib.schema.typed.TyperUtils.checkColumnSchemaVersion(DatabaseSchema, Method)	857
      void org.opendaylight.ovsdb.lib.schema.typed.TyperUtils.access$100(DatabaseSchema, Method)	857
      Object org.opendaylight.ovsdb.lib.schema.typed.TyperUtils$1.processGetColumn(Method)	768
      Object org.opendaylight.ovsdb.lib.schema.typed.TyperUtils$1.invoke(Object, Method, Object[])	768
      Column com.sun.proxy.$Proxy463.getLocatorColumn()	243
      RemoteUcastMacs org.opendaylight.ovsdb.hwvtepsouthbound.transactions.md.HwvtepUcastMacsRemoteUpdateCommand.buildRemoteUcast(UcastMacsRemote)	243
      Node org.opendaylight.ovsdb.hwvtepsouthbound.transactions.md.HwvtepUcastMacsRemoteUpdateCommand.buildConnectionNode(Collection)	243
      void org.opendaylight.ovsdb.hwvtepsouthbound.transactions.md.HwvtepUcastMacsRemoteUpdateCommand.updateUcastMacsRemote(ReadWriteTransaction, Collection)	243
      void org.opendaylight.ovsdb.hwvtepsouthbound.transactions.md.HwvtepUcastMacsRemoteUpdateCommand.execute(ReadWriteTransaction)	243
      void org.opendaylight.ovsdb.hwvtepsouthbound.transactions.md.HwvtepOperationalCommandAggregator.execute(ReadWriteTransaction)	243
      void org.opendaylight.ovsdb.hwvtepsouthbound.transactions.md.TransactionInvokerImpl.run()	243
      void java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker)	243
      void java.util.concurrent.ThreadPoolExecutor$Worker.run()	243
      void java.lang.Thread.run()	243

            vorburger Michael Vorburger
            vorburger Michael Vorburger
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: