mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sasha Pachev <sasha@mysql.com>
To: Rik van Riel <riel@conectiva.com.br>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: disabling kswapd
Date: Sat, 22 Dec 2001 09:31:52 -0700	[thread overview]
Message-ID: <200112221631.fBMGVrM19454@mysql.sashanet.com> (raw)
In-Reply-To: <Pine.LNX.4.33L.0112220212010.15741-100000@imladris.surriel.com>
In-Reply-To: <Pine.LNX.4.33L.0112220212010.15741-100000@imladris.surriel.com>

On Friday 21 December 2001 09:44 pm, Rik van Riel wrote:
> On Fri, 21 Dec 2001, Sasha Pachev wrote:
> 
> > http://www.uwsg.iu.edu/hypermail/linux/kernel/0108.0/0675.html. I
> > adapted it to my kernel ( 2.4.17-rc2), disabled kswapd, did some
> > testing and noticed much better performance.
> 
> This is very hard to believe.
> 
> If kswapd does not run, it just means that _other_ processes
> will run the exact same code, only synchronously (instead of
> having kswapd do the cleanup for them).

That does make a difference. kswapd does its clean-up in a loop that runs 
with very high priority every time it thinks that there are not enough free 
pages. The process will only run this code if it actually fails to find a 
free page, and if I understand correctly, do so with its regular priority, 
right?

In my case, I do not mind if the process gets stuck looking for a free page 
while letting other processes that already have all the pages they need run, 
as opposed to kswapd monopolizing the CPU trying to clean up.

So, I would like to reiterate that kswapd disabling feature would be very 
helpful to have in the kernel. It involves only trivial code changes, and it 
does allow a sysadmin to do things a different way - like I said earlier, 
Linux is about choice, and when it is possible, one should have it.

But actually, digging a little deeper - I think there is still a bug in 
shrink_caches(). Even after disabling kswapd, in one instance I had a process 
brutally murdered at the time when I had over 100MB of cache available. The 
cache was heavily used and growing, if that helps any. 

It must be noted that the one process murder in this case did not compare 
with a massacre that happened in the same situation when kswapd was not 
disabled. About 10 processes got killed.

-- 
MySQL Development Team
For technical support contracts, visit https://order.mysql.com/
   __  ___     ___ ____  __ 
  /  |/  /_ __/ __/ __ \/ /   Sasha Pachev <sasha@mysql.com>
 / /|_/ / // /\ \/ /_/ / /__  MySQL AB, http://www.mysql.com/
/_/  /_/\_, /___/\___\_\___/  Provo, Utah, USA
       <___/                  

      reply	other threads:[~2001-12-22 16:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-22  1:17 Sasha Pachev
2001-12-22  4:44 ` Rik van Riel
2001-12-22 16:31   ` Sasha Pachev [this message]

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=200112221631.fBMGVrM19454@mysql.sashanet.com \
    --to=sasha@mysql.com \
    --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®