Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion CPU usage / Connection problems and sharding

Received: by 10.204.154.133 with SMTP id o5mr2245308bkw.0.1338377626536;
        Wed, 30 May 2012 04:33:46 -0700 (PDT)
X-BeenThere: mongodb-user@googlegroups.com
Received: by 10.204.154.7 with SMTP id m7ls4707757bkw.5.gmail; Wed, 30 May
 2012 04:33:30 -0700 (PDT)
Received: by 10.204.149.210 with SMTP id u18mr2246687bkv.1.1338377609893;
        Wed, 30 May 2012 04:33:29 -0700 (PDT)
Received: by 10.204.149.210 with SMTP id u18mr2246686bkv.1.1338377609878;
        Wed, 30 May 2012 04:33:29 -0700 (PDT)
Return-Path: <sboeseb...@googlemail.com>
Received: from mail-bk0-f49.google.com (mail-bk0-f49.google.com [209.85.214.49])
        by gmr-mx.google.com with ESMTPS id hy18si16670542bkc.2.2012.05.30.04.33.29
        (version=TLSv1/SSLv3 cipher=OTHER);
        Wed, 30 May 2012 04:33:29 -0700 (PDT)
Received-SPF: pass (google.com: domain of sboeseb...@googlemail.com designates 209.85.214.49 as permitted sender) client-ip=209.85.214.49;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of sboeseb...@googlemail.com designates 209.85.214.49 as permitted sender) smtp.mail=sboeseb...@googlemail.com; dkim=pass header...@googlemail.com
Received: by mail-bk0-f49.google.com with SMTP id j4so1290980bkw.36
        for <mongodb-user@googlegroups.com>; Wed, 30 May 2012 04:33:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlemail.com; s=20120113;
        h=content-type:mime-version:subject:from:in-reply-to:date
         :content-transfer-encoding:message-id:references:to:x-mailer;
        bh=OzUYvBCPi1LnyfyJ/zP5pH2Mf39QEu6nsH1gV1y8t2w=;
        b=Mg9GOob5k9o1sqTKFgmfOC0k930DWlFS7FHYUiQcd2bVK3SZjoGR1wSMyMyKFea9v8
         FUohRwmrOf3TKoIjgSoiLEQwtqCc7MzPHbICqfOIXf1PNzYCDdLmEi4XLPXIXzA3KxRC
         A0A22PQvl6pI2mHrZx/4hdmbRo+w+h/DepET1h9Yz/qorwHshoZiNEf5C9INU902JE4A
         CDdPvdW6PbGTWy0iez+83sxGYv377OIEhs4xmTQY+FtdwYwdWMvkqOsfoiUJJnJSO+Ea
         yMp0s7UIdqww4qetAZyRJTwCxUm5k1d8PRM8gA6Q+f7kZopVct3UTPMuGfZZkF0D1Rpq
         p1Gw==
Received: by 10.205.137.5 with SMTP id im5mr1732750bkc.45.1338377609562;
        Wed, 30 May 2012 04:33:29 -0700 (PDT)
Return-Path: <sboeseb...@googlemail.com>
Received: from [192.168.44.12] ([213.252.16.21])
        by mx.google.com with ESMTPS id ie3sm21784283bkc.1.2012.05.30.04.33.28
        (version=TLSv1/SSLv3 cipher=OTHER);
        Wed, 30 May 2012 04:33:28 -0700 (PDT)
Content-Type: text/plain; charset=iso-8859-1
Mime-Version: 1.0 (Apple Message framework v1278)
Subject: Re: [mongodb-user] CPU usage / Connection problems and sharding
From: =?iso-8859-1?Q?Stephan_B=F6sebeck?= <sboeseb...@googlemail.com>
In-Reply-To: <CALOM=qihm0rKa0x9vscOg+B2eHLMBvaRy5VH+VsQNA6KkJT...@mail.gmail.com>
Date: Wed, 30 May 2012 13:33:26 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <5FA19C91-6EC9-489F-A883-D31FE7A53...@googlemail.com>
References: <25d874d0-58bf-43dd-b45d-e1e31a3dd4b1@googlegroups.com> <CALOM=qihm0rKa0x9vscOg+B2eHLMBvaRy5VH+VsQNA6KkJT...@mail.gmail.com>
To: mongodb-user@googlegroups.com
X-Mailer: Apple Mail (2.1278)

Hi Scott,

Lets just answer the questions you asked:
- there are no expensive operations/queries running - the same queries =
work now and in 5 minutes they end in a timeout.
- yes, we us MMS and Munin...
- Version 2.0.2 of MongoDB is installed on all nodes

I was thinking about dropping the sharded collection in order to have it =
re-created as unsharded one getting rid of the balancing issue.

Thanks for the docs you mentioned, I try to configure the balancer only =
to work in the night.




Am 29.05.2012 um 15:15 schrieb Scott Hernandez:

> When there is high cpu are there lots of slow operations? Have you
> checked to make sure there are indexes for these queries and that they
> are efficient? (generally high cpu is caused by queries which cannot
> use an index (efficiently).
>=20
> Are you monitoring with MMS + Munin, or can you provide iostat -xm 2
> data during this periods along with mongostat numbers from each
> primary?
>=20
> You may want to turn off the balancer and see how far out of balance
> your shards gets, or to eliminate balancing as the root cause:
> =
http://www.mongodb.org/display/DOCS/Sharding+Administration#ShardingAdmini=
stration-Balancing
>=20
> In general you don't want to drop a sharded collection as they will
> not only get rid of all the data, but also the sharded metadata about
> the shard key, and will make the collection be un-sharded. There is a
> bug related to dropping a sharded collection, and then adding it back
> -- what version are you using?
>=20
> On Tue, May 29, 2012 at 9:07 AM, Stephan <sboeseb...@googlemail.com> =
wrote:
>> Hi everybody,
>>=20
>> we're using Mongo in our productive environment with 2 shards (each =
part of
>> a replica set). Almost every day I see that several of these nodes do =
have a
>> 100% cpu usage and for some time do not respond to queries. This =
results in
>> Erros and strange behavior of our website. When taking a closer look =
at the
>> mongodb logs, it seems that there is shard reorganizing going on.
>> Unfortunately this causes the java driver to end with an exception =
("can't
>> call something")
>>=20
>> We're actually not sure, if sharing is the right approach here. We =
have a
>> collection where business related events and profiling information is =
being
>> stored. This tend to be several per second and will be processed =
offline.
>> Right now there are about 112847590 entries in this collection, half =
of
>> which in each shard.
>>=20
>> So, my question is: is it possible to optimize sharding so that the
>> reorganization of it does not bring the whole server to stop?
>> And: what happens if i delete a sharded collection in an environment =
where
>> several entries are made in a second? will this work or bring us =
down?
>>=20
>> I was thinking about exporting the data, dropping the sharded =
collection and
>> re-importing the needed data, keep the historic stuff safe.
>>=20
>> Any ideas?
>>=20
>> Thanks
>>=20
>>=20
>> --
>> You received this message because you are subscribed to the Google
>> Groups "mongodb-user" group.
>> To post to this group, send email to mongodb-user@googlegroups.com
>> To unsubscribe from this group, send email to
>> mongodb-user+unsubscribe@googlegroups.com
>> See also the IRC channel -- freenode.net#mongodb
>=20
> --=20
> You received this message because you are subscribed to the Google
> Groups "mongodb-user" group.
> To post to this group, send email to mongodb-user@googlegroups.com
> To unsubscribe from this group, send email to
> mongodb-user+unsubscribe@googlegroups.com
> See also the IRC channel -- freenode.net#mongodb