Linux is too conservative of memory for Desktops

Who would have thought I would be writing an article about how Linux is too good at keeping memory usage low? I don’t want memory to be used badly or stupidly, but I really hate swapping and virtual memory slowdowns (My finger is pointing at you Java).

I’ve tried all the “fixes” (such as setting vm.swappiness to 0), but I think it’s time to just go without a swap partition. If I can find out how to get the swap to only mount when it will be needed that would be great, but otherwise I’ll setup a daemon script that simply checks the current usage level, and if over say 75% runs swapon -a.

Just to be clear I’m not running ApacheMySQL, or PHP on this machine, which may use the swap in this way legitimately.

You think I’m crazy? Well, maybe since I am talking to a imaginary reader for the sake of writing this post, but the statistics about my swap usage just don’t add up:

  • I’ve got 2GB of RAM in this notebook.
  • I never see it go beyond 800MB of actual usage. (Unless I am running my Virtual Machine for XP to test IE7)
  • sysctl vm.swappiness gives “vm.swappiness = 0″.
  • That’s great that it’s low, but it’s using my swap which is much slower and unneeded, while there is still 1GB of untouched memory.

What’s the point in having 2GB of memory if the kernel is going to fight and keep me below 1GB usage?

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

No Comments

Post a Comment

Your email is never shared. Required fields are marked *