MongoDB Analysis

Linux Applications - Best Practices - MongoDB

Velocity Software has worked closely with MongoDB and specific clients to collect, measure and report on approximately 140 metrics from the MongoDB perspective. Unfortunately, MongoDB has deprecated SNMP support in version 6, leaving these three ways to acquire the specfic metrics Velocity was previously able to acquire:

However, the reports below will still show all key attributes acquired from a Linux perspective. MongoDB is an in-memory database, making memory management on of the key metrics. As MongoDB charges customers by memory footprints, over allocation is expensive. This is especially true if using IBM's Random Array of Independent Memory (RAIM).

Also, Velocity Software has developed zLMD which allows a Linux guest to query and then push that data into monitor records which are sent to z/VM. If finding SNMP is no longer supported at your level of SNMP, this is a viable solution.

There are suggestions below for alert thresholds. These are general. The optimal settings are application dependent and will depend on the specific deployment of MongoDB.

For MongoDB, the screens and reports are slightly different. Screens ESAMNG1R and ESAMNG3D have data that is incorporated into the ESAMNG1 and ESAMNG3 reports respectively.

ESAMON screens/ESAMAP reports:

Screens: Reports:

Using zVPS to find information for solving issues with the Linux applications:


ESAMNG1 - Shows information about the MongoDB configuration.

?

  • Node - This shows the zTCP node name.
  • DB Size - This shows the total size of the database in MBs.
  • Real Memory Total/Avail/Used - This shows the memory usage. It shows the total size of the memory allocated to the virtual machine, the available (or free) memory and the amount in use.
  • Mongo Version - This shows the level of MongoDB that is running.
  • Uptime - This shows how long the MongoDB has been up and running.
  • Replication/Health - This shows the health of the replication partner where '--' means no replica, '1' means healthy. Set an alert for health status greater than 1.
  • Replication/Set Name - This shows the replica set name associated with this node.
  • Replication/State - This shows the state of the member of the replica set.
  • Replication/Primary - This shows the host name of the replica set or 'Sngl' if the node is not part of a replica set.

  • ESAMNG1R - Shows information about the MongoDB Replicas and Shards.

    ?

  • Node - This shows the zTCP node name.
  • Replica/Shard Set - This shows the name of the replica/shard and the type (primary/secondary).
  • Uptime - This shows the days/hours/minutes the MongoDB has been running.
  • Health - This shows the health of the replication partner. If a number is present and is not a 1, then investigate.

  • ESAMNG2 - Shows information about the MongoDB processing.

    ?

  • Node - This shows the zTCP node name.
  • Connections Open - This shows the number of clients currently connected to the database server.
  • Connections Active - This shows the number of active connections to the database server. It is a good idea to get a baseline for a "normal" number of connections and set an alert. If the number increases, verify resources are being managed effectively or if the number decreases it could mean a nework or connection issue.
  • Ticket Threads/Reads/Writes - This shows the number of threads currently spawned by the database server, the number of read tickets and write tickets available. Tickets represent the number of concurrent operations allowed into the WiredTiger memory engine.
  • Op Latency Cmd/Read/Write - This shows the total time for an operation from start to completion (in ms) for commands, reads and writes.
  • Working Cmd/Read/Write - This shows the internal working time for an operation (in ms) for commands, reads and writes.
  • Network In/Out - This shows the inbound and outbound network kilobytes per second. Again, determine the "average" counts and set alerts for high or low conditions
  • Disk Read/Write - This shows the disk read and write bytes per second.

  • ESAMNG3 - Shows information about the MongoDB memory.

    ?

  • Node - This shows the zTCP node name.
  • Database Host/Name - This shows the database name (report only)
  • DB Size - This shows the total size of the database in Megabytes.
  • Real Memory Total/Avail/Used - This shows the data from Linux about the node (in Megabytes). It shows the Total size of memory allocated to the virtual machine, the Available (or free) memory and the Used memory.
  • Mongo Memory Resident/Virtual - This shows the memory value (in Megabytes) in use by the database process - both real and virtual.
  • Page Flts/Reclaim - This shows the number of Linux page faults (Flts) and the number of reclaimed pages (Reclaim). Set an alert for a non-zero number in Flts, it could indicate a memory leak.
  • Evicted Modified/Unmodified - This shows the number of pages that were removed to make room for additional data, both Modified and Unmodified.
  • Cache Used/Max - This shows the current (Used) and the maximum (Max) amount of memory used/allocated for the WiredTiger cache.

  • ESAMNG4 - Shows information about the MongoDB databases.

    ?

  • Node Name - This shows the zTCP node name.
  • Primary/Secondary Rate Inserts - This shows the operation rates per second for inserts.
  • Primary/Secondary Rate Query - This shows the operation rates per second for queries.
  • Primary/Secondary Rate Update - This shows the operation rates per second for updates.
  • Primary/Secondary Rate Delete - This shows the operation rates per second for deletes.
  • Primary/Secondary Rate Getmore - This shows the operation rates per second for GETMORE.
  • Primary/Secondary Rate Cmds - This shows the operation rates per second for commands issued.
  • Op Totals Cmd/Read/Write - This shows the total number of operations for commands, reads from the database and writes to the database.
  • Latency Cmd/Read/Write - This shows the total time for an operation from start to finish (in ms) for command, read and write latency.
  • Working Cmd/Read/Write - This shows the internal working time for an operation from start to finish (in ms) for commands, reads and writes.
  • Block Manager Pages Read/RdChkpt/Written/Dirty - This shows the WiredTiger Block Manager statistics - The number of pages read, the number of checkpoint pages read, the number of pages written and the number of dirty pages in cache.

  • ESAMNG5 - Shows information about MongoDB performance.

    ?

  • Node - This shows the zTCP node name.
  • Database Host/Name - This shows the database name (report only)
  • Active Clients Rdrs/Wrtrs - This shows the number of active clients connected to the database - the number reading and the number writing. If there are continuous spikes in these numbers, it can mean the system is overloaded. It would be helpful to set an alert if the condition lasts more than 5 minutes.
  • Current Queue Rdrs/Wrtrs - This shows the number of operations queued because of a lock - the number queued readers and the number of queued writers.
  • Asserts - This shows the internal checks for errors by the database engine
  • Asserts Reg - This shows the regular assertions that are logged by the database engine.
  • Asserts Trip - This shows the Tripwire assertions that are fatal errors that flag the termination of the database manager.
  • Asserts Msg - This shows the message assertions that are logged by the database engine.
  • Asserts User - This shows the user assertions that are application errors (like out of disk space, duplicate key, etc).
  • Asserts Roll - This shows the number of times the assertion counter has rolled over.

  • ESAMNGS - Shows the MongoDB RAM profile. This is zMAP report only.

    ?

  • Server Name - This shows the MongoDB server name.
  • Current Connects - This shows the amount of current connections for the server.
  • VMRES - This shows the z/VM resident memory in megabytes.
  • Linux System Ram/Anonymous - For the system and anonymous RAM, the size, what is in cache, what is available, how much is acive/inactive and swap.
  • Process RAM - This shows the size, Resident Storage Size and data for the process.
  • Disk - This shows disk reads and writes.
  • Segment - This shows the segments in and out.
  • Mongo Process - This shows the MongoDB process name and percentage of CPU in use.

  • ESAMNGP - Shows the MongoDB CPU profile. This is zMAP report only.

    ?

  • Server Name - This shows the MongoDB server name.
  • CPU Threads - This shows the percentage, maximum and count of the threads.
  • Current Connects - This shows the amount of current connections for the server.
  • Mongo Process ID - This shows the name and cpu percentage of running processes.

  • Back to top of page
    Back to Performance Tuning Guide