From: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
To: Con Kolivas <kernel@kolivas.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: swapping and the value of /proc/sys/vm/swappiness
Date: Tue, 14 Sep 2004 18:41:58 -0300 [thread overview]
Message-ID: <20040914214158.GA363@logos.cnet> (raw)
In-Reply-To: <41477661.9030204@kolivas.org>
On Wed, Sep 15, 2004 at 08:53:21AM +1000, Con Kolivas wrote:
> Marcelo Tosatti wrote:
> >On Tue, Sep 14, 2004 at 11:31:53AM -0700, Florin Andrei wrote:
> >
> >>On Mon, 2004-09-06 at 16:27, Andrew Morton wrote:
> >>
> >>>Con Kolivas <kernel@kolivas.org> wrote:
> >>
> >>>>The change was not deliberate but there have been some other people
> >>>>report significant changes in the swappiness behaviour as well (see
> >>>>archives). It has usually been of the increased swapping variety
> >>>>lately. It has been annoying enough to the bleeding edge desktop users
> >>>>for a swag of out-of-tree hacks to start appearing (like mine).
> >>>
> >>>All of which is largely wasted effort.
> >>
> >>>From a highly-theoretical, ivory-tower perspective, maybe; i am not the
> >>one to pass judgement.
> >>>From a realistic, "fix it 'cause it's performing worse than MSDOS
> >>without a disk cache" perspective, definitely not true.
> >>
> >>I've found a situation where the vanilla kernel has a behaviour that
> >>makes no sense:
> >>
> >>http://marc.theaimsgroup.com/?l=linux-kernel&m=109237941331221&w=2
> >>http://marc.theaimsgroup.com/?l=linux-kernel&m=109237959719868&w=2
> >>http://marc.theaimsgroup.com/?l=linux-kernel&m=109238126314192&w=2
> >>
> >>A patch by Con Kolivas fixed it:
> >>
> >>http://marc.theaimsgroup.com/?l=linux-kernel&m=109410526607990&w=2
> >>
> >>I cannot offer more details, i have no time for experiments, i just need
> >>a system that works. The vanilla kernel does not.
> >
> >
> >Have you tried to decrease the value of /proc/sys/vm/swappiness
> >to say 30 and see what you get?
> >
> >Andrew's point is that we should identify the problem - Con's patch
> >rewrites swapping policy.
>
> I already answered this. That hard swappiness patch does not really
> rewrite swapping policy. It identifies exactly what has changed because
> it does not count "distress in the swap tendency". Therefore if the
> swappiness value is the same, the mapped ratio is the same (in the
> workload) yet the vm is swappinig more, it is getting into more
> "distress". The mapped ratio is the same but the "distress" is for some
> reason much higher in later kernels, meaning the priority of our
> scanning is getting more and more intense. This should help direct your
> searches.
> These are the relevant lines of code _from mainline_:
>
> distress = 100 >> zone->prev_priority
> mapped_ratio = (sc->nr_mapped * 100) / total_memory;
> swap_tendency = mapped_ratio / 2 + distress + vm_swappiness
> if (swap_tendency >= 100)
> - reclaim_mapped = 1;
>
>
> That hard swappiness patch effectively made "distress == 0" always.
OK.
So isnt it true that decreasing vm_swappiness should compensate
distress and have the same effect of your patch?
To be fair I'm just arguing, haven't really looked at the code.
next prev parent reply other threads:[~2004-09-14 23:27 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-06 19:11 swapping and the value of /proc/sys/vm/swappiness Ray Bryant
2004-09-06 20:10 ` Andrew Morton
2004-09-06 21:22 ` Ray Bryant
2004-09-06 21:36 ` Andrew Morton
2004-09-06 22:37 ` William Lee Irwin III
2004-09-06 23:51 ` Nick Piggin
2004-09-07 0:31 ` Ray Bryant
2004-09-06 22:48 ` William Lee Irwin III
2004-09-06 23:09 ` Con Kolivas
2004-09-06 23:27 ` Andrew Morton
2004-09-06 23:34 ` Con Kolivas
2004-09-07 0:03 ` Marcelo Tosatti
2004-09-07 1:34 ` Con Kolivas
2004-09-07 10:38 ` Nick Piggin
2004-09-07 10:56 ` Con Kolivas
2004-09-08 16:45 ` Marcelo Tosatti
2004-09-09 1:12 ` Con Kolivas
2004-09-07 17:03 ` Ray Bryant
2004-09-07 21:20 ` Marcelo Tosatti
2004-09-08 2:18 ` Marcelo Tosatti
2004-09-08 14:20 ` Ray Bryant
2004-09-08 16:54 ` Marcelo Tosatti
2004-09-08 19:35 ` Ray Bryant
2004-09-08 19:30 ` Marcelo Tosatti
2004-09-09 3:06 ` Ray Bryant
2004-09-09 2:14 ` Marcelo Tosatti
2004-09-09 14:21 ` Ray Bryant
2004-09-09 3:09 ` William Lee Irwin III
2004-09-09 14:16 ` Ray Bryant
2004-09-09 17:23 ` William Lee Irwin III
2004-09-28 1:54 ` Ray Bryant
2004-09-28 3:36 ` Nick Piggin
2004-09-29 0:36 ` Nick Piggin
2004-09-29 4:23 ` Ray Bryant
2004-09-30 17:15 ` Ray Bryant
2004-09-08 17:31 ` Martin J. Bligh
2004-09-08 18:04 ` Rik van Riel
2004-09-08 19:50 ` Diego Calleja
2004-09-08 21:10 ` Martin J. Bligh
2004-09-08 21:55 ` Diego Calleja
2004-09-08 22:20 ` Martin J. Bligh
2004-09-08 23:22 ` Rik van Riel
2004-09-09 16:26 ` Bill Davidsen
2004-09-08 22:28 ` Alan Cox
2004-09-08 23:42 ` Martin J. Bligh
2004-09-08 19:54 ` Ray Bryant
2004-09-08 15:19 ` Ray Bryant
2004-09-14 18:31 ` Florin Andrei
2004-09-14 20:15 ` Marcelo Tosatti
2004-09-14 22:53 ` Con Kolivas
2004-09-14 21:41 ` Marcelo Tosatti [this message]
2004-09-15 0:22 ` Con Kolivas
2004-09-16 18:50 ` Marcelo Tosatti
2004-09-17 0:22 ` Con Kolivas
2004-09-15 16:54 ` Florin Andrei
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=20040914214158.GA363@logos.cnet \
--to=marcelo.tosatti@cyclades.com \
--cc=kernel@kolivas.org \
--cc=linux-kernel@vger.kernel.org \
/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