-
Notifications
You must be signed in to change notification settings - Fork 0
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
Is Your Linux Version Hiding Interrupt CPU Usage From You? | Tanel Poder Consulting #18
Comments
For full stack dev perspective you see something is consuming cpu resources but you can't locate anything, like your server under light load slows. Thanks for this reaserch, and i can understand ubuntu devs choose to become op sys for dumps. |
This bit from the VMware paper caught my eye: "There is also a timer that can generate periodic interrupts at any power-of- two rate from 2Hz to 8,192Hz" Once upon a time (Oracle 8 I think) I found that Oracle was measuring time in binary (1024) milliseconds. Now I thin I know why. |
Ha indeed. I think there was also the issue of some operating systems doing quick math by shifting bits instead of proper multiplication/division (so x1000 became x1024 thanks to the bit shift). Not everywhere, of course, but in some sleep/wait duration related places... |
Hello, I have some questions about time accounting of linux. My 2 core system with a main process which has about 30 threads, is making weird symptom. When I see top or htop, cpu utilization % is very low, but my main process(which has 30 threads)'s cpu usage is very high. It doesn't have any IOwait time. How can this possible?? I checked /proc/stat and /proc//stat, and I saw weird thing. |
What distro & kernel version are you using? Perhaps there's some accounting/summarization error somewhere in |
Thank's for reply!! It's Xilinx's Petalinux(which is Yocto based), v5.4 and PREEMPT-RT. |
Thanks for your research,your article has settled my doubts,I‘m deeply grateful. |
Is Your Linux Version Hiding Interrupt CPU Usage From You? | Tanel Poder Consulting
TL;DR: Some Linux distros and even different kernel versions within a distro have disabled IRQ time accounting. In such case, your monitoring tools will report zero time spent in hardware interrupt handlers (shown as %hi, %irq, hiq, etc). It’s easy to check how your kernel is behaving by looking at /proc/stat and you can still measure interrupt CPU usage using perf and a little creativity.
Index Index Problem Explanation Kernel configuration options Measuring IRQ time with perf Different distros and kernel versions Summary Here’s a reminder that your Linux kernel may be not breaking down hardware interrupt CPU usage separately in its /proc/stat CPU time reporting, depending on the kernel’s compile-time set
https://tanelpoder.com/posts/linux-hiding-interrupt-cpu-usage/
The text was updated successfully, but these errors were encountered: