pt-diskstats: rd_avkb & wr_avkb derived incorrectly

Bug #872699 reported by Aurimas Mikalauskas
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Percona Toolkit moved to https://jira.percona.com/projects/PT
Fix Released
Medium
Brian Fraser

Bug Description

/proc/diskstats displays sectors read and sectors written in columns #6 and #10. Sectors are typically 512b units, however pt-diskstats assumes one sector = 1kb. Therefore, it would be best either to rename them to "rd_avsct" and "wr_avsct", or divide the number by 2 to display kilobytes.

Here's a sample that clearly shows that numbers do not add up. I've written 1MB with dd using oflag=direct bs=131072 count=8:

  #ts device rd_s rd_avkb rd_mb_s rd_mrg rd_cnc rd_rt wr_s wr_avkb wr_mb_s wr_mrg wr_cnc wr_rt busy in_prg
  {1} sdb 0.0 0.0 0.0 0% 0.0 0.0 7.9 256.0 1.0 0% 0.0 0.0 0% 0

Thank you,
Aurimas

description: updated
tags: added: pt-diskstats
tags: added: wrong-value
removed: doc
Changed in percona-toolkit:
importance: Undecided → Medium
milestone: none → 2.0-beta2
Changed in percona-toolkit:
status: New → Confirmed
Revision history for this message
Baron Schwartz (baron-xaprb) wrote :

Let's keep the column name as-is and fix the math.

tags: added: wrong-output
removed: wrong-value
Changed in percona-toolkit:
assignee: nobody → Brian Fraser (fraserbn)
Brian Fraser (fraserbn)
Changed in percona-toolkit:
status: Confirmed → Fix Committed
Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

For the record, Brian says that there are test cases which were fixed by the new code.

Changed in percona-toolkit:
status: Fix Committed → Fix Released
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PT-427

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.