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

Slow Inserts on MongoDB Sharded Cluster

    • Server Triage

      I am having issues with progressively worse performance for inserts and Updates on my MongoDB cluster. Initially, I was getting speeds upto 10 cr records in 19 minutes. Now, it is down to 31.30L / hr.

      The data configuration is as follows -
      1. 8 collections having a cumulative of 30cr records.
      2. 1 collection having upwards of 190cr records.

      The delay only gets significant on the part 2 (I am getting the speeds of 30 L/hr, on inserts after 160 cr records are already on that collection).

      There are 4 indices on that collection. One default on (_id), two on 1 string field each and finally a compound index on 4 fields. The final compound index is being used for sharding.

      I am running a MongoDB Sharded cluster, with two shards, each having one primary and two secondary data nodes. I also have a set of three configuration servers (1 primary and 2 secondaries). The nodes are divided as follows

      1. Machine 1 -> 1 node from replica set A, one node from replica set B.
      2. Machine 2 and Machine 3 -> Same as above.
      3. Machine 4,5,6 -> Each having a Configuration Node
      4. Machine 7 -> Runs a Mongos (Query Router).

      Configuration of the Systems (128GB RAM and 12 cores). Do I need to change anything in terms of the distribution of my nodes across servers and/or any changes in the collection's indexing and sharding?

      Any other advice to improve the data insertion and updation is also appreciated.

            Assignee:
            backlog-server-triage [HELP ONLY] Backlog - Triage Team
            Reporter:
            abhishek.kulkarni@unotechsoft.com Abhishek Kulkarni
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: