[SERVER-10894] Mongostat delay with summarization Created: 25/Sep/13 Updated: 22/Aug/14 Resolved: 22/Aug/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Tools |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Kevin J. Rice | Assignee: | Unassigned |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
Mongostat currently runs once per second by default, this can be changed by specifying a sleep interval. With large numbers of shards and replicas, this can be a lot of data to transmit once per second. it would be nice to be able to alter this to a 5-second interval. BUT: this is NOT a sleep concept:
Or, all could be both averaged and summed , with additional columns for avg/sum of each. Knowing the number of inserts/second would be nice, but averaged over 5 seconds vs. total number in the last 5 seconds - these are useful datapoints. |
| Comments |
| Comment by Thomas Rueckstiess [ 22/Aug/14 ] | ||||||||||||
|
Hi Kevin, mongostat does average the results per second, this is described on the mongostat documentation page. I've done a quick test and confirm that this works as described: This script inserts a burst of 1000 documents, then sleeps for 10 seconds.
Running mongostat 10 outputs this:
If mongostat really considered only the last second, we'd see 0 inserts or 1000 inserts, but it's averaging over the full 10 seconds, returning 100 docs/sec on average. Given that the stats are indeed averaged, I believe duplicating every column to additionally output the total numbers (n * <sleepdelay>) is not very helpful. The rows would get really wide and the impact on readability outweighs the added benefit. Thanks, | ||||||||||||
| Comment by Kevin J. Rice [ 03/Apr/14 ] | ||||||||||||
|
In testing with 2.6.0 RC3, It looks like invoking it on a sharded replicated database with: mongostat --discover --host myhost --port 9999 5 This makes it print every 5 seconds, and this is good. But, it looks like it's not averaging the results over the last 5 seconds, it's just sleeping for 4 seconds and running again. Am I correct? The numbers seem to fluctuate widely even every 5 seconds, which should not reflect my workload. Of course, I could be wrong - am I ? |