Re: 2.6.0-test9 - poor swap performance on low end machines

From: Con Kolivas (kernel_at_kolivas.org)
Date: 11/03/03

  • Next message: Linus Torvalds: "Re: [OOPS] Linux-2.6.0-test9"
    To: Chris Vine <chris@cvine.freeserve.co.uk>, Rik van Riel <riel@redhat.com>
    Date:	Mon, 3 Nov 2003 11:48:40 +1100
    
    
    

    On Mon, 3 Nov 2003 10:06, Chris Vine wrote:
    > On Friday 31 October 2003 3:57 am, Rik van Riel wrote:
    > > On Wed, 29 Oct 2003, Chris Vine wrote:
    > > > However, on a low end machine (200MHz Pentium MMX uniprocessor with
    > > > only 32MB of RAM and 70MB of swap) I get poor performance once
    > > > extensive use is made of the swap space.
    > >
    > > Could you try the patch Con Kolivas posted on the 25th ?
    > >
    > > Subject: [PATCH] Autoregulate vm swappiness cleanup
    >
    > OK. I have now done some testing.
    >
    > The default swappiness in the kernel (without Con's patch) is 60. This
    > gives hopeless swapping results on a 200MHz Pentium with 32MB of RAM once
    > the amount of memory swapped out exceeds about 15 to 20MB. A static
    > swappiness of 10 gives results which work under load, with up to 40MB
    > swapped out (I haven't tested beyond that). Compile times with a test file
    > requiring about 35MB of swap and with everything else the same are:
    >
    > 2.4.22 - average of 1 minute 35 seconds
    > 2.6.0-test9 (swappiness 10) - average of 5 minutes 56 seconds
    >
    > A swappiness of 5 on the test compile causes the machine to hang in some
    > kind of "won't swap/can't continue without more memory" stand-off, and a
    > swappiness of 20 starts the machine thrashing to the point where I stopped
    > the compile. A swappiness of 10 would complete anything I threw at it and
    > without excessive thrashing, but more slowly (and using a little more swap
    > space) than 2.4.22.
    >
    > With Con's dynamic swappiness patch things were worse, rather than better.
    > With no load, the swappiness (now read only) was around 37. Under load
    > with the test compile, swappiness went up to around 62, thrashing began,
    > and after 30 minutes the compile still had not completed, swappiness had
    > reached 70, and I abandoned it.

    Well I was considering adding the swap pressure to this algorithm but I had
    hoped 2.6 behaved better than this under swap overload which is what appears
    to happen to yours. Can you try this patch? It takes into account swap
    pressure as well. It wont be as aggressive as setting the swappiness manually
    to 10, but unlike a swappiness of 10 it will be more useful over a wide range
    of hardware and circumstances.

    Con

    P.S. patches available here: http://ck.kolivas.org/patches

    
    

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/



  • Next message: Linus Torvalds: "Re: [OOPS] Linux-2.6.0-test9"

    Relevant Pages

    • Re: 2.6.0-test9 - poor swap performance on low end machines
      ... > swap pressure as well. ... It wont be as aggressive as setting the swappiness ... The test compile started in a similar way to the compile when using your first ... After 40 minutes of thrashing it came down to 53. ...
      (Linux-Kernel)
    • Re: 2.6.0-test9 - poor swap performance on low end machines
      ... >> Well I was considering adding the swap pressure to this algorithm but I ... It wont be as aggressive as setting the swappiness ... > The test compile started in a similar way to the compile when using your ... detriment of other tasks that are on the runqueue and still need ram. ...
      (Linux-Kernel)
    • Re: 2.6.0-test9 - poor swap performance on low end machines
      ... >> is made of the swap space. ... The default swappiness in the kernel is 60. ... 35MB of swap and with everything else the same are: ... A swappiness of 5 on the test compile causes the machine to hang in some kind ...
      (Linux-Kernel)
    • Re: 2.6.0-test9 - poor swap performance on low end machines
      ... > the detriment of other tasks that are on the runqueue and still need ram. ... The test compile was not of the kernel but of a file in a C++ program ... Being able to choose a manual setting for swappiness is not "futile". ...
      (Linux-Kernel)
    • Re: why swap at all?
      ... then yes the autoregulated swappiness patch should help. ... swap discussion centres around 2 different arguments. ... desktop users will feel the former and not really notice the latter. ... Yet you know that if you set your swappiness to 0 mozilla will load ...
      (Linux-Kernel)