是什么导致mongodb replset如此缓慢?

时间:2017-03-03 07:13:07

标签: mongodb replication database-replication replicaset

这是与主节点的第一次同步:

2017-03-03T02:26:22.035+0100 I -        [repl writer worker 3]   prodbase.offer collection clone progress: 283940/5543302 5% (documents copied)
2017-03-03T02:36:17.984+0100 I -        [repl writer worker 3]   prodbase.offer collection clone progress: 564884/5543302 10% (documents copied)
2017-03-03T02:48:31.792+0100 I -        [repl writer worker 3]   prodbase.offer collection clone progress: 849813/5543302 15% (documents copied)
2017-03-03T03:02:14.751+0100 I -        [repl writer worker 3]   prodbase.offer collection clone progress: 1138030/5543302 20% (documents copied)
2017-03-03T03:14:10.938+0100 I -        [repl writer worker 3]   prodbase.offer collection clone progress: 1474370/5543302 26% (documents copied)
2017-03-03T03:32:53.645+0100 I -        [repl writer worker 3]   prodbase.offer collection clone progress: 1846885/5543302 33% (documents copied)
2017-03-03T03:46:50.211+0100 I -        [repl writer worker 3]   prodbase.offer collection clone progress: 2207922/5543302 39% (documents copied)
2017-03-03T03:56:41.963+0100 I -        [repl writer worker 3]   prodbase.offer collection clone progress: 2568851/5543302 46% (documents copied)
2017-03-03T04:08:13.513+0100 I -        [repl writer worker 3]   prodbase.offer collection clone progress: 2921563/5543302 52% (documents copied)
2017-03-03T04:27:33.926+0100 I -        [repl writer worker 3]   prodbase.offer collection clone progress: 3230454/5543302 58% (documents copied)
2017-03-03T05:09:17.002+0100 I -        [repl writer worker 3]   prodbase.offer collection clone progress: 3408499/5543302 61% (documents copied)
2017-03-03T05:27:33.817+0100 I -        [repl writer worker 3]   prodbase.offer collection clone progress: 3531029/5543302 63% (documents copied)
2017-03-03T06:12:44.765+0100 I -        [repl writer worker 3]   prodbase.offer collection clone progress: 3747209/5543302 67% (documents copied)
2017-03-03T06:49:28.263+0100 I -        [repl writer worker 3]   prodbase.offer collection clone progress: 3894147/5543302 70% (documents copied)
2017-03-03T07:46:30.452+0100 I -        [repl writer worker 3]   prodbase.offer collection clone progress: 4001247/5543302 72% (documents copied)
2017-03-03T08:06:56.895+0100 I -        [repl writer worker 3]   prodbase.offer collection clone progress: 4108649/5543302 74% (documents copied)

所有服务器都位于同一数据中心,它们之间的速度为250 Mbit / s。

1 个答案:

答案 0 :(得分:0)

建议:转到3.4.x

初始同步的重大改进

否则,所有这些都取决于您在主要数据上有多少数据

避免这种情况的另一个解决方案是

  1. 备份您的主要
  2. 将primary恢复到您的辅助
  3. 配置并开始复制