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

Read performance dependency

    XMLWordPrintableJSON

Details

    • Icon: Question Question
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • None
    • 2.6.1
    • Performance, Querying
    • None

    Description

      I have three collections sharded on 2 servers with date as shard key -

      Collection A - 25 million documents with avg bsonSize: 700 bytes (10k -15k docs per day)

      Collection B - 30 million documents with avg bsonSize: 500 bytes (12k -16k docs per day)

      Collection C - 25 million documents with avg bsonSize: 1500 bytes (10k -15k docs per day)

      Collection A & B gives decent (good) read performance like -
      On first hit, for new date, i get records in almost 1 second (15k docs)
      On second hit, it comes in 10-15 ms (due to cache)

      But Collection C read performance is not as good -
      On first hit, for new date, takes almost 50 seconds (15k docs, same number)
      Second hit is fast as expected (5-10 ms)

      Collection A & C are replica of each other in terms of Index and Shard Key. Only difference is collection A has fewer keys (50%) in comparison to collection C. And still so much difference in read performance?

      This leads to conclusion - read performance depends on document size of collection. More the size is more time it will take to fetch documents on first hit (when not cached)..Is that right?

      Any way to improve read performance of collection C ?

      Thanks.

      Attachments

        Activity

          People

            Unassigned Unassigned
            itsmejainh Himanshu Jain
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: