Improve connection pool scaling

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • 5.3.0
    • Affects Version/s: None
    • Component/s: Connection Management
    • None
    • 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.
    • None
    • None
    • None
    • None
    • None
    • None

      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 Kavalenka
            Reporter:
            Daniel Hill
            None
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: