Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question about iostat avgqu-sz #126

Open
DigitalMarc opened this issue Sep 22, 2016 · 6 comments
Open

Question about iostat avgqu-sz #126

DigitalMarc opened this issue Sep 22, 2016 · 6 comments

Comments

@DigitalMarc
Copy link

Hi,
First, thanks a lot for that amazing tool!
I want to calculate the avgqu-sz. Looking at the code it seems that the formula is:
((current_ticks - prev_ticks) / itv * HZ ) / 1000
where itv * HZ == (jiffies_uptime - previous_jiffies_uptime) * HZ
and current_ticks or prev_ticks are the last field from /proc/diskstats at each interval. (weighted time spent doing I/Os (ms) according to https://www.kernel.org/doc/Documentation/ABI/testing/procfs-diskstats
Is this correct?

Best regards.

@sysstat
Copy link
Owner

sysstat commented Sep 23, 2016

Hi,
Yes, that's correct.
Regards.

@DigitalMarc
Copy link
Author

Merci Sebastien!

I was wondering because I can't get the exact same values. Basically if I stress the hard drive, my implementation of this function shows it straight but iostat take a longer time to show that high activity is happening (longer time took to show progression).
As well when the stress test is done, iostat avgqu-sz values take a while to reduce. Any thought on this?

@sysstat
Copy link
Owner

sysstat commented Sep 23, 2016

Sorry, no obvious reasons come to my mind.
Do you mean that iostat keeps on displaying some values which don't show that the stress test has already started before the values actually change? This is rather strange for iostat just picks its values from the kernel (/proc interface) and displays the corresponding stats...

@DigitalMarc
Copy link
Author

Thanks for the quick reply!
Yes basically it takes time to reflect that stress is happening or over. I've noticed that the bigger the uptime of linux is, the slower avgqu-sz track changes.
Basically if I reset uptime (reboot for instance), avgqu-sz will follow pretty well the stress values. The longer the machine is up, the less avgqu-sz will be reactive.
I'm using a VM Ubuntu 14.04.
The type of stress I'm doing is such as "stress --hdd 20 --timeout 30s"

@sysstat
Copy link
Owner

sysstat commented Sep 23, 2016

Does iostat behave the same if you don't use a VM?

@DigitalMarc
Copy link
Author

My last real linux died literally 2 days ago so I can't tell :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants