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

replSetGetStatus thousands of time per second from mongos

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.8.3
    • Component/s: Replication, Sharding
    • None
    • Environment:
      Sharded cluster with three shards, each shard is a replica set consisting of two replicas and one arbiter runnning Ubuntu Linux. The Balancer is turned off.
    • Linux

      We and the replica originally defined when adding the shard (with the db.runCommand(

      { addshard : "replicaset/hostname" }

      ); command) is primary mongos seems to execute a replSetGetStatus for each insert or query it executes.
      We are doing several thousands of inserts per second ant this behavior causes a severe performance impact. When switching primarys to a replica discovered by mongos this behavior stops and the performance go back to normal. This behavior is consitent trhougout the cluster on all three shards.

      This is an output from mongostat when the primary is the server originally defined when adding the shard in mongos:

      insert query update delete getmore command
      553 195 0 0 175 1285

      This is from mongostat when the other server is primary:

      insert query update delete getmore command
      607 279 0 0 175 196

      Notice the vast difference in command/s.

        1. rs.status.txt
          46 kB
        2. printsharding.txt
          46 kB
        3. mongos_log.log
          311 kB

            Assignee:
            spencer@mongodb.com Spencer Brody (Inactive)
            Reporter:
            otto@burtcorp.com Otto Bergström
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: