News for hackers. Stuff that matters.
Re:CPU Utilization is Wrong by inetknght on Tuesday May 09, 2017 @06:06PM (#14304220)
I use `htop` for all of my Linux machines. It's great software. But one of my biggest gripes is that "Detailed CPU Time" (F2 -> Display options -> Detailed CPU time) is not enabled by default.

Enabling it allows you to see a clearer picture of not just stalls but also CPU steal from "noisy neighbors" -- guests also assigned to the same host.

I've seen CPU steal cause kernel warnings of "soft-lockups". I've also seen zombie processes occur. I suspect they're related but it's only anecdotal: I'm not sure how to investigate.

It's pretty amazing what kind of patterns you can identify when you've got stuff like that running. Machine seems to be non-responsive? Open up htop, see lots of grey... okay so since all data is on the network, that means that it's a data bottleneck; over the network means it could be bottlenecked at network bandwidth or the back-end SAN could be bottlenecked.

Fun fact: Windows Server doesn't like not having its disk IO not be serviced for minutes at a time. That's not a fun way to have another team come over and get angry because you're bluescreening their production boxes.

Re:CPU Utilization is Wrong by brendangregg on Tuesday May 09, 2017 @06:15PM (#14304291)
Screenshot? My version of htop does not show stalls. The only top I've seen that uses PMCs is tiptop.

htop should add PMC support, and a lot more things too. I might even start using it then. :)

Re:CPU Utilization is Wrong by qb45 on Tuesday May 09, 2017 @07:19PM (#14304698)
It's steal, not stall - time "stolen" by the hypervisor, i.e. when you have runnable threads but the CPU is busy servicing other VMs. This can lead to stalling of your software, I guess, but it has nothing to do with instruction stalls.
Re:CPU Utilization is Wrong by aarmenaa on Tuesday May 09, 2017 @06:31PM (#14304380)
htop, at least in the version I'm using, only shows steal if it's non-zero.
Re:CPU Utilization is Wrong by rodionos on Wednesday May 10, 2017 @04:08AM (#14306625)
steam time is available from mpstat. It's a machine-scoped metric so it should not belong to top which is process-scoped.
Re:CPU Utilization is Wrong by fuzzy2 on Wednesday May 10, 2017 @07:11AM (#14307317)
`top`, as well as `htop`, report some global stats like total memory utilization, swap usage, load average and CPU usage. So that’s totally fine.