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

Improve connection pool scaling

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 5.3.0
    • Affects Version/s: None
    • Component/s: Connection Management
    • None
    • Fully Compatible
    • Java Drivers
    • Needed
    • Hide

      Let's mention in what's new that we removed explicit fairness from our connection pool implementation. We expect this to allow for better throughput when MongoClient is used by many application threads, at the potential cost of increased tail latency.

      Show
      Let's mention in what's new that we removed explicit fairness from our connection pool implementation. We expect this to allow for better throughput when MongoClient is used by many application threads, at the potential cost of increased tail latency.

      modified YCSB 100 ping workload without ssl cannot scale vertically past 300 kops/s no matter how many threads you specify in YCSB. Offcpu flamegraph shows unsafe_park mutex

      Unsafe_Park is being called inside ConcurrentPool.get() and ConcurrentPool.release() where it calls lockInterruptiblyUnfair(). I believe this is the culprit.

        1. image-2024-10-30-12-49-09-756.png
          image-2024-10-30-12-49-09-756.png
          255 kB
        2. image-2024-10-30-12-50-43-170.png
          image-2024-10-30-12-50-43-170.png
          646 kB
        3. java_merged_off.svg
          372 kB
        4. oncpu.html
          595 kB

            Assignee:
            valentin.kovalenko@mongodb.com Valentin Kavalenka
            Reporter:
            daniel.hill@mongodb.com Daniel Hill
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: