Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-9105

why cpp/c driver is much slower than java driver when mongodb server is cold?

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.4.1
    • Internal Client
    • None
    • windows xp x86

    Description

      I need load all documents in a big collection(millions), but only two fields.
      My application is build in java. I don't satisfied with the speed, so I tried cpp and c driver. the result is nice when server is warmed up. But I found when the server is just started, the cpp driver is far slower than java's, the c driver is worse.

      btw: it's a covered query, but without hint it will be a basic cursor. What confused me is when I add a hint, it will be slower despite indexOnly is true. @.@

      The benchmark(approximate):

      lang cold warm
      java 48s 6s
      cpp 200s 2s
      c 400s 3s

      I wonder how this happens?
      Can you explain it? How to improve it?
      Thanks

      Attachments

        Activity

          People

            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            kobevaliant kobevaliant
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: