[SERVER-8203] Add replication section to serverStats.metrics Created: 16/Jan/13  Updated: 19/Mar/13  Resolved: 30/Jan/13

Status: Closed
Project: Core Server
Component/s: Diagnostics
Affects Version/s: None
Fix Version/s: 2.4.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Daniel Pasette (Inactive) Assignee: Scott Hernandez (Inactive)
Resolution: Done Votes: 0
Labels: metrics, replication, stats
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on DOCS-1066 Document replication section in serve... Closed
Duplicate
is duplicated by SERVER-7081 Track (new) replication stats Closed
Related
Participants:

 Description   

Add the following counters and timers to serverStatus.metrics:

"repl" : {
	"apply" : { //applied operations on the replica (not primary)
		"batches" : {
			"num" : ##, //number of batches applied across all db active in the batch
			"totalMillis" : ## //time to apply
		},
		"ops" : ## //applied operations
	},
	"buffer" : { //stuff to be applied, came off the network and in a holding pattern till the application threads start to work on it.
		"count" : ##, //current count items in the buffer 
		"maxSizeBytes" : ##, //max size of the buffer, in bytes
		"sizeBytes" : ## //current size of the buffer, in bytes
	},
	"network" : { //network stats during replication from the source
		"bytes" : ##, //the amount of data read from the replication source
		"getmores" : {
			"num" : ##, //number of getmore (batches) made to the source
			"totalMillis" : ## //time taken to collect the data
		},
		"ops" : ##, //number of ops read from the source oplog
		"readersCreated" : ## //number of oplog readers created -- this will happen if any error occurs on the connection (timeout, network loss, etc), if a new source is used for example
	},
	"oplog" : {
		"insert" : {
			"num" : ##, //entries inserted into the oplog
			"totalMillis" : ## //time take to do the inserts
		},
		"insertBytes" : ## //the size (in bytes) that were inserted
	},
	"preload" : { //these number depend on the prefetch mode
		"docs" : {
			"num" : ##, //documents which were loaded before being updated
			"totalMillis" : ## //time taken to load the docs
		},
		"indexes" : {
			"num" : ##, //number of index entries loaded before updating the docuemtnes
			"totalMillis" : ## //time taken to load the index entries
		}
	}
}



 Comments   
Comment by auto [ 07/Feb/13 ]

Author:

{u'date': u'2013-02-07T14:16:30Z', u'email': u'scotthernandez@gmail.com', u'name': u'Scott Hernandez'}

Message: SERVER-8203: cleanup test for failing buildbot
Branch: master
https://github.com/mongodb/mongo/commit/2e3e2e9957eac59b670d5adbad1483d4615e1845

Comment by Ian Whalen (Inactive) [ 29/Jan/13 ]

reopening until all builds are passing.

Comment by auto [ 29/Jan/13 ]

Author:

{u'date': u'2013-01-29T21:57:15Z', u'email': u'scotthernandez@gmail.com', u'name': u'Scott Hernandez'}

Message: SERVER-8203: explicitly include header for windows
Branch: master
https://github.com/mongodb/mongo/commit/cbbb6288961bb749deaf6af662bd6e45a715fd32

Comment by auto [ 29/Jan/13 ]

Author:

{u'date': u'2013-01-29T21:01:07Z', u'email': u'scotthernandez@gmail.com', u'name': u'Scott Hernandez'}

Message: SERVER-8203: replication metrics test fix
Branch: master
https://github.com/mongodb/mongo/commit/e63efd1a41b62ece64d4fce7576fbc8f888b786a

Comment by auto [ 29/Jan/13 ]

Author:

{u'date': u'2013-01-29T19:36:24Z', u'email': u'scotthernandez@gmail.com', u'name': u'Scott Hernandez'}

Message: SERVER-8203: replication metrics
Branch: master
https://github.com/mongodb/mongo/commit/84df92e10e2458cd4ff3751c620535aa9f9a92b6

Comment by Eric Milkie [ 22/Jan/13 ]

Refinement of the above:
"receivedBytes" is already reflected in replNetworkQueue.numBytes, I believe.
number of oplog entries processed is almost reflected in replNetworkQueue.numElems

It would be most valuable to show the time prefetching takes in total, and the number of batches and total time spent applying batches (how many calls and how long multiApply() takes).
readersCreated is also valuable.

Generated at Thu Feb 08 03:16:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.