1

I am using mongodb 1.6 for our production .

I am having the following questions

Could anybody please help me how do i find out the answers for these questions ??

  1. How to identify queries in mongodb that is taking longer time to run ??
  2. How to see Page Faults in MongoDB ??
  3. What is this RAID Concept and how do i know what RAID i am using ?? (because it says that if RAID is 10 then performance will be greater )
  4. How to know the size of the working set in MongoDB ??
  5. How to see the load of an instance in mongodb ,because it says that

    If your instance shows a load over 65%, you should consider scaling up. Your load should be consistently below this threshold during normal operations

fvu
  • 32,488
  • 6
  • 61
  • 79

2 Answers2

0

First off, you might want to consider upgrading to a newer MongoDB version. The current version is 2.4, and 1.6 is quite old. Below I'm going to reference features as they are in the current MongoDB version. They may or may not exist that way in 1.6.

  1. MongoDB logs queries that take longer than a given threshold (by default 100ms) to the mongod's main log file. You can set that threshold to a different value using db.setProfilingLevel() or the --slowms command line option.
  2. Use the mongostat command.
  3. RAID means "Redundant Array of Independent Disks". It means you are not talking to a single disk but a group of disk configured to stripe/replicate your data in some pattern. That pattern is categorized by the number behind the word RAID. The recommended pattern for MongoDB is RAID 10.
  4. The working set consists of those documents that your application regularly needs. There is no way to "measure" the working set accurately, although the db.serverStatus() command provides an estimation of it in 2.4. The goal is that mongod can keep all the documents it is normally working with directly within mongod's memory. You should rarely, if ever, see page faults in mongostat. If you do, that is an indication that your working set does not fit in memory.
  5. On a Unix system you would use top, or uptime to report the load factor. It should not be higher than 0.65 * the number of CPUs your box has.
drmirror
  • 3,698
  • 26
  • 26
0
  1. answered in MongoDB logging all queries
  2. info about page faults can be found with the serverStatus command
  3. RAID is, well, RAID. RAID 10, the combination of striping and mirroring is commonly considered as the better option for database storage due to its combination of speed and reliability. RAID support is provided either by a hardware controller (like Dell's PERC or HP's Smartarray families of controllers) - commonly called hardware RAID or eg by Linux md. The latter is often called software RAID.
  4. working set info is only available from 2.4 so you will need to upgrade (why are you still using 1.6 anyways)?
  5. use the monitoring tool that comes with your environment to check load.
Community
  • 1
  • 1
fvu
  • 32,488
  • 6
  • 61
  • 79
  • Thanks a lot for your answers , is RAID means sharding ?? –  Aug 20 '13 at 13:10
  • 1
    No, RAID is just the way the harddisks are organized (and it's effectively invisible for the software that's running), please read the linked Wikipedia article. Sharding [is supported by MongoDB](http://docs.mongodb.org/manual/sharding/) but it's managed by Mongo itself, and is thus unrelated to what RAID setup is used for the disks. Conceptually sharding sort of related to RAID0 though. – fvu Aug 20 '13 at 13:15