mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: safemode <safemode@speakeasy.net>
To: Rik van Riel <riel@conectiva.com.br>,
	Mark Hahn <hahn@physics.mcmaster.ca>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: graphical swap comparison of aa and rik vm
Date: Thu, 1 Nov 2001 23:18:02 -0500	[thread overview]
Message-ID: <20011102041808Z280556-17408+9240@vger.kernel.org> (raw)
In-Reply-To: <Pine.LNX.4.33L.0111011009090.2963-100000@imladris.surriel.com>

I think the answer of why AA's kernel beat rik's has nothing to do with how 
much swap rik is using or how much swap is being swapped back in.  It has to 
do with how rik decides what to swap.  Apparently the algorithm used by rik 
to play with memory is taking seriously too much cpu and it leaves little for 
the actual process to work.  Thus AA's less cpu intensive code allows the 
program to actually run and despite making errors in what to swap-out, the 
process finishes well before Rik's more intelligent code.  

Unfortunately, the trailing columns in my aa vmstat somehow got lost during 
the paste from terminal buffer to file.  This means i'm going to have to redo 
it all in order to get an accurate measurement to compare system cpu time to 
the rik vm.  But for now i think the rik vm system graph is sufficient.  And 
there are some numbers from the AA vmstat and those alone show a much lower 
cpu usage than in rik's. MUCH.

I made an overlay of Rik's system ( kernel ) cpu usage on top of the so and 
si graphs to illustrate this.  Bottom being 0% top being 100% usage. 

http://safemode.homeip.net/sys_so.png 
Here we see that after every major write out, there is major kernel cpu 
usage.  This is serious usage, and this is the reason why rik's VM loses the 
race even though it swapped out and in the right things the first try more 
often than AA's.  

http://safemode.homeip.net/sys_si.png 
Of course after each major write out in Rik's vm there is a minor read in.   
These happen to be directly under the cpu spikes so this could be the cause 
of the cpu usage, perhaps determining where the page is?  I dont know enough 
about what's going on in the code to figure out if the VM does something 
after writing out that could be using all that cpu or if whenever it needs to 
read in.  Although now that i look at it i'm tending to lean towards some bad 
code dealing with swap -> ram. 

This is truly where the simple vm design conquers the complex. Less cpu being 
used by the kernel means more by the program, and sometimes the time gained 
by not using a lot of cpu greatly outweighs the time lost by having to 
correct mistakes with deciding what gets swapped in and out. 

Maybe i'm wrong as to the cause of the kernel cpu usage, but from the numbers 
i do have from AA's vmstat, they are much higher in Rik's vm than in 
Andrea's.  That and the fact that Rik's vm seems to be doing the right thing 
whereas Andrea's is having to fix mistakes yet Rik's loses seems to tell you 
that i'm not wrong in thinking that it's the vm's cpu usage that is the 
culprit.  

  parent reply	other threads:[~2001-11-02  4:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-01  3:18 safemode
2001-11-01  3:41 ` Alex Pennace
2001-11-01  3:50   ` safemode
2001-11-01  6:10 ` safemode
2001-11-01  6:23 ` Mark Hahn
2001-11-01  6:41   ` safemode
2001-11-01  6:59   ` safemode
2001-11-01 11:08   ` Helge Hafting
2001-11-01 12:10   ` Rik van Riel
2001-11-01 13:47     ` safemode
2001-11-02  4:18     ` safemode [this message]
2001-11-01 21:23   ` Dirk Moerenhout
     [not found] <20011102041819.4C36238C0A@perninha.conectiva.com.br>
2001-11-02 11:17 ` Rik van Riel
2001-11-02 13:07   ` safemode
     [not found] <20011102130750.1760138C77@perninha.conectiva.com.br>
2001-11-02 13:14 ` Rik van Riel
2001-11-02 23:48   ` safemode
2001-11-03 15:36     ` safemode

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011102041808Z280556-17408+9240@vger.kernel.org \
    --to=safemode@speakeasy.net \
    --cc=hahn@physics.mcmaster.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=riel@conectiva.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®