Uploaded image for project: 'TinkerPop'
  1. TinkerPop
  2. TINKERPOP-2855

Performance degradation in TinkerGraph 3.5.4 and 3.5.5

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 3.5.4, 3.5.5
    • 3.7.0, 3.6.3, 3.5.6
    • tinkergraph
    • Ubuntu 22.04.1, docker

    Description

      Hello,

      I few days ago I tried to update gremlin-server in our project from 3.5.3 to 3.5.4 and found out that it's test suite got 5 times slower. We use the official docker image(tinkerpop/gremlin-server) with some configuration changes:

      gremlin.tinkergraph.vertexIdManager=ANY
      gremlin.tinkergraph.edgeIdManager=ANY 

      The app uses user-generated string ids and heavily relies on the upsert pattern from the recipes.

      Yesterday I made an investigation and narrowed it down to the performance of the upsert pattern. I also discovered that the issue is not related to our configuration changes and can be reproduced with vanilla image and LONG ids.

      I prepared a simple script that reproduces the issue and contacted Stephen Mallette on discord. They confirmed the issue exists, but only in 3.5.4, 3.6.0 performs as expected. They also wrote a groovy script that reproduces the problem:

      g = TinkerGraph.open().traversal()
      batches = (0..<100).collect{ (0..<100) }
      start = System.currentTimeMillis()
      for (batch in batches) {
        b = g
        for (id in batch) {
          b = b.V(id).fold().coalesce(__.unfold(), __.addV("test").property(T.id, id))
        }
        b.iterate()
      }
      System.currentTimeMillis() - start
      

      discord message

      Both my and Stephen's scripts perform a few times slower when executed against 3.5.4 in compare to 3.5.3 or 3.6.0.

      Steps to reproduce:

      Run my or Stephen's script against vanilla tinkerpop/gremlin-server:3.5.4 docker image

      Expected result:

      Script's execution time matches it's time when executed against 3.5.3 or 3.6.0

      Observed result:

      The script is 5-7 times slower.

      Attachments

        Activity

          People

            spmallette Stephen Mallette
            zhulik Gleb Sinyavskiy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: