Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-3612

Overhead from Java driver during Linkbench

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.1.0
    • Affects Version/s: 3.11.0, 3.12.0
    • Component/s: Performance
    • Environment:
      Linux

      I am working on a benchmark (Linkbench) for MongoDB. When I run the same workload for MongoDB 4.2.1 and MySQL 5.7.28 I see ~2.5X more CPU time in the Linkbench client for MongoDB than for the MySQL client. The client accounts for about 1/3 of total CPU time on the benchmark so my hope is that this can be reduced. The client includes generic code, per-DBMS code (MongoDB, MySQL) and code from the per-DBMS driver.

      Most of the overhead is from BSON decode & encode functions. I will try using a codec next but reducing CPU overhead in the Java driver will still be useful for clients that don't use a code.

      I attached CPU profiler output from VisualVM. Unfortunately the tool must be used to explore it. I have taken screenshots from the profiler tool but they have been hard to read. I can provide screenshots if they might help. But exploring via VisualVM is the best bet.

        1. mo42.4t.mem.prof.nps
          1.56 MB
        2. snap.5m.new.nps
          209 kB
        3. snap.5m.old.nps
          214 kB
        4. snap.new.nps
          237 kB
        5. snap.old.nps
          239 kB

            Assignee:
            ross@mongodb.com Ross Lawley
            Reporter:
            mark.callaghan@mongodb.com Mark Callaghan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: