| Summary: | iostat(8): msps from iostat is wrong | ||
|---|---|---|---|
| Product: | Base System | Reporter: | elias <elias> |
| Component: | bin | Assignee: | freebsd-bugs (Nobody) <bugs> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 3.4-RELEASE | ||
| Hardware: | Any | ||
| OS: | Any | ||
Responsible Changed From-To: gnats-admin->freebsd-bugs Misfiled PR. State Changed From-To: open->suspended We don't actually measure the time per transaction in the kernel, so it isn't really possible to give the user a "real" time per transaction number. The number we print out is an average time per transaction, derived as the submitter guessed from the number of transactions in the measurement period and the measurement period itself. There has been talk about doing a kernel facility to measure the time per transaction, but I don't expect it to happen any time soon. So I'm leaving this PR in the suspended state in case I decide to do a facility to measure the time per transaction at some point in the future. Responsible Changed From-To: freebsd-bugs->ken I'm the iostat maintainer. Responsible Changed From-To: ken->freebsd-bugs With permission, reassign away from inactive committer. State Changed From-To: suspended->feedback After some research in connection with this PR I believe it can be closed. Revision r81134 (from Aug 2001) switched from compute_stats(3) to devstat_compute_statistics(3). With this change a lot of 'real' kernel stats could be accessed from within iostat(8). One of these stats is: " DSM_MS_PER_TRANSACTION_FREE type: long double * The average duration of transactions of the specified type between the acquisi- tion of previous and current. " This means that 'msps' is now being derived from actual kernel stats and no longer from 'tps'. Since this is such an old PR and I'm not 100% sure I got this right, I'm keeping it in feedback state until somebody can verify or falsify my assumption. Cheers. Alex State Changed From-To: feedback->closed Since nobody seemed to disagree with my assumption, go ahead and close this PR. |
The report of msps from iostat don't correspond to stated in man page. This is a sample of the output from "iostat -t da -w 5 -do" da0 da1 sps tps msps sps tps msps 490 41 24.7 107 6 179 559 51 19.6 94 5 218 513 37 27.2 154 6 179 166 18 56.3 26 1 1253 291 28 36.3 32 2 418 158 12 80.8 10 1 1670 156 13 74.8 29 0 2505 313 25 40.7 28 0 2505 101 10 98.2 0 0 0.0 160 15 65.1 13 1 1253 304 23 43.2 94 4 250 118 10 104 3 0 5010 47 6 179 0 0 0.0 202 17 59.6 185 2 501 169 12 83.5 0 0 0.0 111 7 152 0 0 0.0 464 22 45.1 0 0 0.0 330 26 39.1 54 2 455 Multiplying tps by msps for da0 we obtain the following numbers: average=1009ms; min=969ms; max=1074 ms. This seems to me that msps is not a real measurement but instead, is derived mathematicaly from 1/tps (1 second divided by tps number). Howhever we need a real msps measurement to know how our disks are doing their job. How-To-Repeat: execute the command "iostat -t da -w 5 -do" and see the results.