Slow MongoDB start time when data is replicated to a new machine
-
10-10-2020 - |
题
We have a 3.2.13 Mongodb replica set with WiredTiger on AWS.
We are observing a strange behaviour: when stopping and starting the mongod service, the start time is about 10 minutes, but when stopping the mongod service, then replicating the data disk to a new AWS instance, and restarting on that machine, the start time is about 2 hours.
What may be the cause for this?
解决方案
It looks like the initial slowness is because the EBS volume (which is restored from snapshot) is being initialized during the service startup.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-initialize.html
不隶属于 dba.stackexchange