High CPU Usage with mongos

324 views
Skip to first unread message

Edward Lim

unread,
Apr 25, 2015, 8:26:14 AM4/25/15
to mongod...@googlegroups.com
Hi,

We're seeing high CPU usage on our test application servers running with mongos. We've observed an additional 25% CPU load running mongos versus our current database solution during high load. Our load test application servers generate about 5,000 queries per second for mongos. These queries are simple findOne queries on a single, indexed field, which is why we think it's strange that we're seeing such a high CPU load.

We're running MongoDB 3.0 with WiredTiger storage engine. Here's our database setup:

3 replica sets
2 shards per replica set (i2.2xlarge EC2 instances)
1 config server running 3 config processes
1 test application server running mongos

Is there anything we can do to lower CPU usage with mongos? We'd like to lower that figure because with the additional CPU hit, our application servers would run with little headroom.

Thanks,
Ed

Asya Kamsky

unread,
Apr 25, 2015, 10:00:43 PM4/25/15
to mongodb-user
It's specifically mongos processes running hot, right?

One thing you can do is check when they are consuming a lot of CPU - is it continuous?   Is CPU usage noticeable before the queries start?    Is high CPU only during what you call "high load"?  Is it constantly high then?  Or periodic?

I'm not clear what you mean by "2 shards per replica set".    How many shards are in your cluster?   How many nodes does each shard have (I assume each shard is a replica set of X members - how many is X)?

One config server running 3 - do you mean all three mongod processes for config servers are on the same physical box?  That's really a bad idea and it defeats the point of having three config servers...

Single document point queries are not really very intensive - is your cluster fully balanced or might there be splitting and balancing going on still?

Asya
 

--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/63be7aeb-c90e-4db1-b134-da8e6ec146c7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MongoDB World is back! June 1-2 in NYC. Use code ASYA for 25% off!
Reply all
Reply to author
Forward
0 new messages