[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Review Request 120406: ksysguardd: Avoid including IO-wait in CPU load.
From:       Thomas_Lübking <thomas.luebking () gmail ! com>
Date:       2014-10-06 13:04:40
Message-ID: 20141006130440.10360.83103 () probe ! kde ! org
[Download RAW message or body]

--===============3863484427894311122==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit



> 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. 
> Thomas Lübking wrote:
> 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) 
> Søren Holm wrote:
> You are right. The time the CPU is doing nothing is "idle + iowait". So \
> for at quardcore system with a blocking dd running:  idletime==75%  \
> iowait=25%. From a visualization point of view the idletime is AFAIK not \
> visualized anywhere - only actual CPU-usage is displayed. And IO-wait is \
> for sure not actual CPU-usage since the kernel will be idling there as \
> well. 
> Do you know other people that might have a better felling of the \
> ksysguardd code? I for sure have worse insight than you :)

Try adding John Tapsell


- 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
> 
> 


--===============3863484427894311122==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit




<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: \
1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/120406/">https://git.reviewboard.kde.org/r/120406/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; \
padding-left: 10px;">  <p style="margin-top: 0;">On Oktober 5th, 2014, \
10:29 vorm. UTC, <b>Milian Wolff</b> wrote:</p>  <blockquote \
style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">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?</p></pre>  </blockquote>




 <p>On Oktober 5th, 2014, 10:45 vorm. UTC, <b>Søren Holm</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; \
padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">That's right. But fact is \
that IO-wait is not time actually used. It's just a clasification of the \
idle cpu time.</p></pre>  </blockquote>





 <p>On Oktober 5th, 2014, 11:04 vorm. UTC, <b>Thomas Lübking</b> \
wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  <pre style="white-space: pre-wrap; \
white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: \
-o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">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?</p></pre>  </blockquote>





 <p>On Oktober 5th, 2014, 11:29 vorm. UTC, <b>Søren Holm</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; \
padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">Well - it should not be \
added.</p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">usertime + nicetime + \
systemtime + idletime = 1</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">idletime = \
true_idle_time + iowait</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">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.</p></pre>  </blockquote>





 <p>On Oktober 5th, 2014, 11:38 vorm. UTC, <b>Thomas Lübking</b> \
wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  <pre style="white-space: pre-wrap; \
white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: \
-o-pre-wrap; word-wrap: break-word;"><p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">If "idletime" \
already is an aggregation of the /proc/stat idle and iowait, then that's of \
course not needed.</p> <blockquote style="text-rendering: inherit;padding: \
0 0 0 1em;border-left: 1px solid #bbb;white-space: normal;margin: 0 0 0 \
0.5em;line-height: inherit;"> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">The \
true_idle_time is the percentage of time where a process is waiting for \
IO.</p> </blockquote>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">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.</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">As mentioned, \
I don't know the code, all I can tell is that fields 4 &amp; 5 are disjunct \
(you will eg. notice that when monitoring dd: idle drops where iowait \
raises)</p></pre>  </blockquote>





 <p>On Oktober 5th, 2014, 12:11 nachm. UTC, <b>Søren Holm</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; \
padding-left: 10px;">  <pre style="white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">You are right. The time the \
CPU is doing nothing is "idle + iowait". So for at quardcore system with a \
blocking dd running:  idletime==75%  iowait=25%. From a visualization point \
of view the idletime is AFAIK not visualized anywhere - only actual \
CPU-usage is displayed. And IO-wait is for sure not actual CPU-usage since \
the kernel will be idling there as well.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Do you know other people that might have a better felling of the \
ksysguardd code? I for sure have worse insight than you :)</p></pre>  \
</blockquote>








</blockquote>

<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Try adding John Tapsell</p></pre> <br />










<p>- Thomas</p>


<br />
<p>On September 28th, 2014, 3:07 nachm. UTC, Søren Holm wrote:</p>









<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" \
style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: \
6px; -webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for kde-workspace.</div>
<div>By Søren Holm.</div>


<p style="color: grey;"><i>Updated Sept. 28, 2014, 3:07 nachm.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kde-workspace
</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description \
</h1>  <table width="100%" bgcolor="#ffffff" cellspacing="0" \
cellpadding="10" style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">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.</p></pre>  \
</td>  </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing \
</h1> <table width="100%" bgcolor="#ffffff" cellspacing="0" \
cellpadding="10" style="border: 1px solid #b8b5a0">  <tr>
  <td>
   <pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;"><p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">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)</p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">dd if=/dev/sdb of=/dev/null \
bs=1M </p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">This end up being around 0% \
with my patch.</p></pre>  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> \
</h1> <ul style="margin-left: 3em; padding-left: 0;">

 <li>ksysguard/ksysguardd/Linux/stat.c <span style="color: \
grey">(534a465)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/120406/diff/" \
style="margin-left: 3em;">View Diff</a></p>






  </td>
 </tr>
</table>








  </div>
 </body>
</html>


--===============3863484427894311122==--


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic