SYS-CON MEDIA Authors: Jason Bloomberg, Eric Brown, Bob Gourley, Sandi Mappic, RealWire News Distribution

Blog Feed Post

Mongo and Monitis: A NoSQL Dream Come True

Mongo is a wonderful new NoSql solution from the folks at 10gen, and it has really gained a large following with a reputation for being high performance and developer friendly.  There are lots of good articles on Mongo best practices, see here and here for some examples.
We are going to go over a few common issues that people run into with Mongo, and how Monitis can help keep you informed and alert you to potential issues.
Too Many Connections

Connections to a database are good because that means that people are connecting to your database and using your data.  Unfortunately, too many open connections on any of your Mongo databases will take the entire instance down.  Why does this happen?  Well for starters more connections typically means more queries, so it could just be a load issue, which you would want to know about.  On the other hand, a ton of open connections could mean that your Mongo clients are not disconnecting after they are finished asking for data.

Open connections consume resources.  Too many open connections can take down your entire instance even if they are not running any queries.  You should monitor the number of connections with Monitis to make sure that everything is running smoothly.  Load testing should give you an idea of the number of connections to set an alert for.

More Data than RAM

Once, your data set and indexes gets bigger than the amount of RAM available on your instance, then Mongo will start paging to disk.  When this happens performance will start to degrade potentially rapidly as the data set grows.  This might be OK, then again it might be the worst thing ever.

Keeping an eye on the “virtual memory” is the best way to gauge the performance of your Mongo instances.  With, you can monitor this important statistic easily, and you can set up an alert to go off whenever you cross that dreaded RAM threshold whether it’s 4GB or 32GB. Monitis

Timeouts: A Database’s Worst Enemy

Your Mongo queries should not timeout, period.  With a custom Monitis Monitor reading the HTTP Console you can find out if your database is throwing timeouts.  If it is, then you should investigate.  It might just be a bad query or two that needs to be better optimized.  In which case you can scold the developers for poor database practices.  However, cursor timeouts might also indicate that you are overloading your instance, and it might be time to either scale up or out.

At this point, you should have a good idea about how and what to monitor on your Mongo instances, and how to use a great service like Monitis to help.

See also Monitoring Performance on MongoDB – Mongo Basics

Open source code located at github - Monitis-Linux-Scripts / Mongo Monitoring Scripts

Share Now:del.icio.usDiggFacebook LinkedInBlinkListDZoneGoogle BookmarksRedditStumbleUponTwitterRSS

Read the original blog entry...

More Stories By Hovhannes Avoyan

Hovhannes Avoyan is the CEO of Monitis, Inc., a provider of on-demand systems management and monitoring software to 50,000 users spanning small businesses and Fortune 500 companies.

Prior to Monitis, he served as General Manager and Director of Development at prominent web portal Lycos Europe, where he grew the Lycos Armenia group from 30 people to over 200, making it the company's largest development center. Prior to Lycos, Avoyan was VP of Technology at Brience, Inc. (based in San Francisco and acquired by Syniverse), which delivered mobile internet content solutions to companies like Cisco, Ingram Micro, Washington Mutual, Wyndham Hotels , T-Mobile , and CNN. Prior to that, he served as the founder and CEO of CEDIT ltd., which was acquired by Brience. A 24 year veteran of the software industry, he also runs Sourcio cjsc, an IT consulting company and startup incubator specializing in web 2.0 products and open-source technologies.

Hovhannes is a senior lecturer at the American Univeristy of Armenia and has been a visiting lecturer at San Francisco State University. He is a graduate of Bertelsmann University.