Thanks for the suggestion about pre-splitting, will definitely try
that out. But it looks like we have a new issue here.
The chunk movement has stopped a couple of days ago (thus currentOp()
dosn't show splitchunk anymore) because it got stuck at a splitvector
operation due to the chunk size over 64MB (80MB). It's been re-trying
to move the same chunk since then, but couldn't move on. I can think
of increasing the chunk size to something like 128MB, but there is no
guarantee all chunks are under 128MB. Another way I can think of is
change the shard key (like a composed key with original shard key in
it), but then our application may end up hitting multiple shards all
the time when querying. Any other good options?
On Jun 30, 7:42 pm, Greg Studer <
g...@10gen.com> wrote:
> There's a high lock % which goes in phases in your primary shard
> mongostat log - this is probably deletions of old chunks, which can
> interfere with yourchunkmovement if constant. Looking to see if
> there's a build with less aggressivechunkdeletion, but in the
> meantime, can you also send us a few db.currentOp()s to verify and
> ensure there's nothing else going on? Feel free to open a support
> ticket if you like.
>
> Using a raided setup would probably help here - as would doing a
> pre-split to load the data initially. Depends on your timeline, but
> since the initial load was very fast, it may be faster for you to
> pre-split and reload the data into bothshardsat once.
>
>
>
>
>
>
>
> On Thu, 2011-06-30 at 14:07 -0700, Beier wrote:
> > some more info that might be helpful.
>
> > All mongod servers use single non-raid EBS volumn
>
> > The initial import was doneagainsta single non-sharded, non-
> > replicated mongod server. When it finished, we built a replication set
> > and let replication finishes. Then we built a new replication set as a
> > second Shard, then started sharding.
>
> > On Jun 30, 1:49 pm, Beier <
beier...@gmail.com> wrote:
> > > sorry, correction: the data size is 240GB, I've heard there might be
> > > issues if the initial data is over 256GB, but we are under that. And
> > > we use Amazon EC2 m2.2xlarge instance type for all non-config servers
> > > (32GB memory, 12 EC2 computing unit on 4 cores)
>
> > > There is no extra load on any of the sharded servers other than chunks
> > >moving, we are waiting for the balancing to finish before hooking it
> > >upwith production.
>
> > > The whole data set was imported from mysql to the primary shard in
> > > about 2 days (6 threads doing about 3000 inserts/sec, synchronous
> > > insert), so the slowness ofmovingchunks kinda surprised me.
>
> > > Right now it's been 2 days, and only 191 of 5000 chunks got moved to
> > > the secondary shard.
>
> > > Below are some iostat and mongostat requested 1pm-1:30pm PST today. I
> > > noticed that the primary shard that contains majority of the data has
> > > been very busy in terms of I/O, much busier than the new shard, is
> > > that supposed to be the correct behavior?
>
> > >
http://dl.dropbox.com/u/282992/iostat_primary_shard.loghttp://dl.drop...
>
> > >
http://dl.dropbox.com/u/282992/iostat_secondary_shard.loghttp://dl.dr...
>
> > > On Jun 29, 9:38 am, Greg Studer <
g...@10gen.com> wrote:
>
> > > > Are you performing updates on the collection as you'removingchunks?
> > > > One possible cause is that it's taking awhile to reach a steady state
> > > > before committing the migration.
>
> > > > On Tue, 2011-06-28 at 14:46 -0700, Beier wrote:
> > > > > I started sharding a big collection with about 500 millions documents,
> > > > > 150GB in size. The router divided the collection into over 5000 chunks
> > > > > and startedmovingthem from primary shard to the new one. the problem
> > > > > is, looks like eachchunktakes like 20-30 minutes to be moved (really
> > > > > long time consideringchunksize is only 64MB), why is it so slow? any
> > > > > way to speed thisup. It's gonna take a month to make it balanced at
> > > > > this speed.
>
> > > > > mongodb 1.8.1
> > > > > Twoshardssetup, each shard is a replica set with 3 servers (1