Review Request 120406: ksysguardd: Avoid including IO-wait in CPU load.

Thomas Lübking thomas.luebking at gmail.com
Sun Oct 5 12:38:47 BST 2014



> On Okt. 5, 2014, 10:29 vorm., Milian Wolff wrote:
> > Hmm... there is no way to see the wait time anywhere then, right? I don't see a way to add individual columns for that. Maybe that should be re-thought for frameworks. I.e. keep the CPU% like now but add more columns for the individual cpu/wait times?
> 
> Søren Holm wrote:
>     That's right. But fact is that IO-wait is not time actually used. It's just a clasification of the idle cpu time.
> 
> Thomas Lübking wrote:
>     Notice that it is NOT included in the idle time, though.
>     I don't know the code in question, but assume it needs to be added to the idletime somewhere?
> 
> Søren Holm wrote:
>     Well - it should not be added.
>     
>     usertime + nicetime + systemtime + idletime = 1
>     
>     idletime = true_idle_time + iowait
>     
>     The true_idle_time is the percentage of time where a process is waiting for IO. During that time the CPU can do other things just as when no process is waiting for IO. IO-wait is AFAIK only used to pinpoint IO-bottlenecks.

If "idletime" already is an aggregation of the /proc/stat idle and iowait, then that's of course not needed.

> The true_idle_time is the percentage of time where a process is waiting for IO.

iowait should be the time where a cpu waits for I/O - the idle field ("true_idle_time", I assume) is the time where it really doesn't do anything.

As mentioned, I don't know the code, all I can tell is that fields 4 & 5 are disjunct (you will eg. notice that when monitoring dd: idle drops where iowait raises)


- Thomas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120406/#review67948
-----------------------------------------------------------


On Sept. 28, 2014, 3:07 nachm., Søren Holm wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120406/
> -----------------------------------------------------------
> 
> (Updated Sept. 28, 2014, 3:07 nachm.)
> 
> 
> Review request for kde-workspace.
> 
> 
> Repository: kde-workspace
> 
> 
> Description
> -------
> 
> IO-wait is included in the cpu usage. This is wrong since IO-wait is a part of the idle time. This goes for both total combines CPU-usage and the per CPU usage.
> 
> 
> Diffs
> -----
> 
>   ksysguard/ksysguardd/Linux/stat.c 534a465 
> 
> Diff: https://git.reviewboard.kde.org/r/120406/diff/
> 
> 
> Testing
> -------
> 
> Fx. running a read from a slow USB-media like this will always end up showing 25% load on my system (I have 4 cores)
> 
> dd if=/dev/sdb of=/dev/null bs=1M 
> 
> This end up being around 0% with my patch.
> 
> 
> Thanks,
> 
> Søren Holm
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20141005/e37ca1b6/attachment.htm>


More information about the kde-core-devel mailing list