[Bug 977319] Re: Swappiness not optimal for desktops

Colin Watson cjwatson at canonical.com
Thu Sep 20 07:43:25 UTC 2012

** Package changed: ubuntu-meta (Ubuntu) => linux (Ubuntu)

You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubuntu-meta in Ubuntu.

  Swappiness not optimal for desktops

Status in “linux” package in Ubuntu:

Bug description:
  (Not sure what package to file this in, if it's wrong I apologize)

  I recently doubled the amount of RAM in my laptop from 1GB to 2GB.
  While noticing a significant improvement, I still got bad response
  time in many programs when multitasking.

  A typical use case:

  - Running Opera, Spotify and Inkscape (all somewhat cache and memory hungry).
  - 1 GB RAM used
  - ~250MB in swap

  Inkscape would for instance respond to commands with a slight delay
  for every action, even when drawing normal lines. Changing views in
  Spotify could be slow. Changing programs took from 0 to 2 seconds.

  Since both CPU and MEM usage was low, I investigated using iotop and
  noticed high io usage everytime there was a delay. I looked up swap
  usage on the net and got introduced to swappiness. Changing it to 10
  and running swapoff and swapon changed everything drastically. The
  delay when switching programs is gone. The delay in Inkscape actions
  and Spotify are gone. Overall the system feels MUCH more responsive.

  To me having a system starting to swap when I have 1GB of available
  memory (half of my ram) is unreasonable. I can see the point of
  reserving a lot of space for heavy operations, like compiling etc, but
  these are not day to day tasks for most users and delays when swapping
  out is to be expected.

  This is anecdotal evidence, but a search on the net shows quite a lot
  of similar cases with similar results.

  What is the rationale for keeping it at 60 for desktops? It certainly
  does not work for me on 2GB of ram and I can only see it making even
  less sense for more RAM as is common nowadays.


  Just thought I should include what the Ubuntu Wiki says about swap for desktops:
  "The default setting in Ubuntu is swappiness=60. Reducing the default value of swappiness will probably improve overall performance for a typical Ubuntu desktop installation. A value of swappiness=10 is recommended, but feel free to experiment. Note: Ubuntu server installations have different performance requirements to desktop systems, and the default value of 60 is likely more suitable."

  Given the immense improvement I'm noticing I strongly feel for the
  users out there just thinking their systems are just slow like I was
  thinking for a long time.

  ProblemType: Bug
  DistroRelease: Ubuntu 12.04
  Package: ubuntu-desktop 1.264
  ProcVersionSignature: Ubuntu 3.2.0-19.30-generic 3.2.11
  Uname: Linux 3.2.0-19-generic i686
  ApportVersion: 1.95-0ubuntu1
  Architecture: i386
  Date: Mon Apr  9 18:08:10 2012
  InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release i386 (20110427.1)
  SourcePackage: ubuntu-meta
  UpgradeStatus: Upgraded to precise on 2012-01-21 (79 days ago)

To manage notifications about this bug go to:

More information about the foundations-bugs mailing list