[SERVER-28091] Disk stats collection on OS X only captures I/O utilization averaged over the uptime of the machine Created: 24/Feb/17  Updated: 14/Apr/17  Resolved: 08/Mar/17

Status: Closed
Project: Core Server
Component/s: Testing Infrastructure
Affects Version/s: None
Fix Version/s: 3.4.4, 3.5.5

Type: Bug Priority: Major - P3
Reporter: Max Hirschhorn Assignee: Jonathan Abrahams
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
is related to SERVER-27234 Evergreen task disk statistics improv... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.4
Sprint: TIG 2017-03-27
Participants:

 Description   

The "run diskstats" function invokes iostat with only the -d option, which causes iostat to only show the I/O utilization averaged over the uptime of the machine. The -w option must be used in order to get the I/O utilization averaged over the specified period. We'll likely want to change the script to run iostat -d -w 5 and add some logic to suppress the I/O utilization averaged over the uptime of the machine.

# OSX: Simulate the iostat timestamp.
elif iostat -d > /dev/null 2>&1; then
    while [ 1 ]
    do
        date +'%m/%d/%Y %I:%M:%S %p' >> mongo-diskstats
        iostat -d >> mongo-diskstats
        printf "\n" >> mongo-diskstats
        sleep 5
    done


The first statistics that are printed are averaged over the system uptime. To get information about the current activity, a suitable wait time should be specified, so that the subsequent sets of printed statistics will be averaged over that time.

https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man8/iostat.8.html



 Comments   
Comment by Githook User [ 13/Apr/17 ]

Author:

{u'username': u'hptabster', u'name': u'Jonathan Abrahams', u'email': u'jonathan@mongodb.com'}

Message: SERVER-28091 Disk stats collection on OS X only captures I/O utilization averaged over the uptime of the machine

(cherry picked from commit ca672940f81c3ea82a935aaa87def6101ff5ac62)
Branch: v3.4
https://github.com/mongodb/mongo/commit/02d0399d1dc531858d525ee718b5e86046974e53

Comment by Githook User [ 08/Mar/17 ]

Author:

{u'username': u'hptabster', u'name': u'Jonathan Abrahams', u'email': u'jonathan@mongodb.com'}

Message: SERVER-28091 Disk stats collection on OS X only captures I/O utilization averaged over the uptime of the machine
Branch: master
https://github.com/mongodb/mongo/commit/ca672940f81c3ea82a935aaa87def6101ff5ac62

Comment by Jonathan Abrahams [ 08/Mar/17 ]

max.hirschhorn Per Linux iostat man page:

The first report generated by the iostat command provides statistics concerning the time since the system was booted. Each subsequent report covers the time since the previous report.

This will be the same problem for the other platforms as well. I suggest we do no special logic to suppress the first report returned.

Generated at Thu Feb 08 04:17:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.