Re: [mongodb-user] Change Balancer Frequency?

67 views
Skip to first unread message

Eliot Horowitz

unread,
Aug 22, 2012, 10:24:38 PM8/22/12
to mongod...@googlegroups.com
The balancer should be checking things every 30 seconds.
If its doing that check every 3-6 minutes, that's probably how long
its taking to actually move the data.
Can you tell if one of the shards is disk bound?

On Wed, Aug 22, 2012 at 5:59 AM, Yann Cluchey <yann.c...@gmail.com> wrote:
> Hi,
>
> I have a 45GB database with 14m documents, spread over two collections. This
> database was originally running on a single server and I have recently
> configured sharding across three nodes. Having enabled sharding for each
> collection, the mongos balancer is starting to distribute the chunks among
> the shards. (There are 899 chunks).
>
> Looking in the mongos log I can see that it periodically makes an assessment
> of the distribution of the data and moves chunks as appropriate.
>
> [Balancer] ChunkManager: time to load chunks for...
> [Balancer] moving chunk...
>
> Judging by the logs, it looks like it's doing this check every 3-6 minutes,
> which means that it's going to take another 1-2 days before it completes.
> (Incidentally, the database is otherwise idling. Nothing is reading/writing
> to it). Is there any way to speed this up? Can I configure the check
> frequency?
>
> From what I've read in the docs, I can configure a time window within which
> I wish to allow re-balancing, but I didn't spot anything about the check
> interval. Is this possible? Or can anyone suggest a quicker approach?
>
> Thanks,
>
> -Yann
>
> --
> You received this message because you are subscribed to the Google
> Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com
> To unsubscribe from this group, send email to
> mongodb-user...@googlegroups.com
> See also the IRC channel -- freenode.net#mongodb

Eliot Horowitz

unread,
Aug 24, 2012, 2:20:34 AM8/24/12
to mongod...@googlegroups.com
If you send the contents of the changelog collection in the config
server, we can see exactly which steps are taking time and how much.
A few seconds seems quite short.

On Thu, Aug 23, 2012 at 3:13 AM, Yann Cluchey <yann.c...@gmail.com> wrote:
> Judging by the I/O I can see on the shards, moving chunks only takes a
> matter of seconds. After that the shards are idling.
>
> -Y

William Z

unread,
Aug 24, 2012, 1:42:49 PM8/24/12
to mongod...@googlegroups.com, el...@10gen.com
Hi Yann!

You can use the following command to dump the contents of the 'changelog' collection to a file:

$ echo 'db.getSisterDB("config").changelog.find().sort({$natural:-1});' | mongo --port $MONGOS_PORT  > filename

Substitute the port used by your 'mongos' process for "$MONGOS_PORT".  The output from this is likely to be too big to post on the group: you can either post the most recent twenty or so entries, or you can post a link to a gist or pastebin containing the entire output..

 -William
Reply all
Reply to author
Forward
0 new messages