Explain steps moveChunk operation in config db changelog

Hi,
I’m investigating the performance of the slow balancer in my cluster and some steps are clearly taking longer than others, however, I can’t find anywhere an explanation of what each step of moveChunk.from and moveChunk.to means, could somebody explain or provide documentation?

What I do is on the config DB use the following query db.changelog.find() and such example responses are returned:

  • moveChunk.from
{
    _id: 'myserver:27017-2022-12-20T05:28:58.272-08:00-63a1b89a2cccc07e737b297',
    server: 'myserver:27017',
    shard: 'shardSrc',
    clientAddr: '',
    time: ISODate("2022-12-20T12:28:58.272Z"),
    what: 'moveChunk.from',
    ns: 'mydb.mycol',
    details: {
      'step 1 of 6': 0,
      'step 2 of 6': 7,
      'step 3 of 6': 115,
      'step 4 of 6': 2182,
      'step 5 of 6': 14,
      'step 6 of 6': 8625,
      min: { _id: Long("-8078899907612850299") },
      max: { _id: Long("-8078890509510611981") },
      to: 'shardDst',
      from: 'shardSrc',
      note: 'success'
    }
  }
  • moveChunk.to
  {
    _id: 'myserver:27017-2022-12-20T05:28:56.578-08:00-63a1b898asdaae95291a541a',
    server: 'myserver:27017',
    shard: 'shardDst',
    clientAddr: '',
    time: ISODate("2022-12-20T12:28:56.578Z"),
    what: 'moveChunk.to',
    ns: 'mydb.mycol',
    details: {
      'step 1 of 8': 2,
      'step 2 of 8': 1455,
      'step 3 of 8': 4,
      'step 4 of 8': 719,
      'step 5 of 8': 0,
      'step 6 of 8': 11,
      'step 7 of 8': 0,
      'step 8 of 8': 6935,
      min: { _id: Long("-8078899907612850299") },
      max: { _id: Long("-8078890509510611981") },
      to: 'shardDst',
      from: 'shardSrc',
      note: 'success'
    }
  }

Thanks for your time

@Bartosz_Dabrowski1 All moveChunk steps mentioned at mongo/README.md at master · mongodb/mongo · GitHub
Seems cloning & commit steps running for a longer duration. What is the version of your mongo? Do you see any latencies, or replication lag in source, destination & config servers?

1 Like