Re: swapping and the value of /proc/sys/vm/swappiness

From: Con Kolivas (kernel_at_kolivas.org)
Date: 09/07/04

  • Next message: Rafael J. Wysocki: "Re: swsusp on x86-64 w/ nforce3"
    To: Ray Bryant <raybry@sgi.com>
    Date:	Tue, 07 Sep 2004 09:09:32 +1000
    
    

    Ray Bryant writes:

    > Andrew (et al),
    >
    > The attached results started as an exercise to try to understand what value of
    > "swappiness" we should be recommending to our Altix customers when they start
    > running Linux 2.6 kernels. The benchmark is very simple -- a task first
    > mallocs around 90% of memory, touches all of the memory, then sleeps forever.
    > After the task begins to sleep, we start up a bunch of "dd" copies. When the
    > dd's all complete, we record the amount of swap used, the size of the page
    > cache, and the data rates for the dd's. (Exact details are given in the
    > attachment.) The benchmark was repeated for swappiness values of 0, 20, 40,
    > 60, 80, 100, for a number of recent 2.6 kernels.
    >
    > What is unexpected is that the amount of swap space used at a particular
    > swappiness setting varies dramatically with the kernel version being tested,
    > in spite of the fact that the basic swap_tendency calculation in
    > refile_ianctive_zone() is unchanged. (Other, subtle changes in the vm as a
    > whole and this routine in particular clearly effect the impact of that
    > computation.)
    >
    > For example, at a swappiness value of 0, Kernel 2.6.5 swapped out 0 bytes,
    > whereas Kernel 2.6.9-rc1-mm3 swapped out 10 GB. Similarly, most kernels
    > have a significant change in behavior for swappiness values near 100, but
    > for SLES9 the change point occurs at swappness=60.
    >
    > A scan of the change logs for swappiness related changes shows nothing that
    > might explain these changes. My question is: "Is this change in behavior
    > deliberate, or just a side effect of other changes that were made in the vm?"
    > and "What kind of swappiness behavior might I expect to find in future kernels?".

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

    Cheers,
    Con

    -
    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: Rafael J. Wysocki: "Re: swsusp on x86-64 w/ nforce3"

    Relevant Pages

    • Re: ~500 megs cached yet 2.6.5 goes into swap hell
      ... It frees up unused memory. ... I run my desktop machines at ... I've see reports with increasing frequency about the swappiness of the ... When Linux starts to swap out apps the ...
      (Linux-Kernel)
    • Re: The performance and behaviour of the anti-fragmentation related patches
      ... of memory. ... With swappiness at the default level of 60, ... problems with the CPU use in the pageout code! ... One thing I do not yet have are easily runnable test cases. ...
      (Linux-Kernel)
    • RE: la la la la ... swappiness
      ... I set swappiness to zero and it doesn't do what I want! ... I have a system that runs as a Linux based data server 24x7 and occasionally ... preallocated a large chunk of memory that is shared amongst several ... a catastrophic failure because I can't control pagecache due to disk I/O. ...
      (Linux-Kernel)
    • Re: /proc/sys/vm/swappiness == 0 makes OOM killer go beserk
      ... When the swappiness variable is set to zero kernel does ... > not try to swap out processes. ... So once all memory is used up by ...
      (Linux-Kernel)
    • Re: swapping and the value of /proc/sys/vm/swappiness
      ... > The change was not deliberate but there have been some other people report ... > significant changes in the swappiness behaviour as well. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)