2

I've read a few articles now about changing the swappiness level on Ubuntu to possibly increase performance. But I'm very unfamiliar with how swappiness works, would I benefit from increasing, or reducing it?

I have 6GB of DDR2.

6
  • no, unless you run out of RAM, which i doubt you ever will. Apr 25, 2011 at 1:07
  • My Ubuntu uses between 700 MB - 1 GB, so I too doubt I will ever run out.
    – Alan
    Apr 25, 2011 at 1:24
  • i have 3GB of RAM, and that's enough for browsing, little games, music, and even running Virtual Machines.. Apr 25, 2011 at 1:37
  • 1
    I have 4GB RAM and 2GB swap space, running one 1.5 GB virtual machine, running eclipse, developing a GWT application in it and I do run out of RAM.
    – Roalt
    Jun 8, 2011 at 10:30
  • The only use of swap outside of serving as virtual RAM is for system hibernation. With 6 GB of RAM, you'll never need virtual memory, and if you don't hibernate you won't need swap altogether.
    – Oxwivi
    Nov 16, 2011 at 6:50

4 Answers 4

1

What's it set to now? How are you using your system?

Linux tends not to use swap much, whatever the settings are, and to be quite efficient with use of system RAM. My desktop system at home, which has only 1 GB of RAM, almost never needs to use swap space; the server systems I monitor in my job, with more RAM but heavier workloads, rarely use much swap space, and we get warnings when they use more than a little.

Most likely, a system with 6 GB of RAM, being used as a desktop, is going to be fine without any special tweaking of swap settings.

3
  • Right now it's set to 60/100.
    – Alan
    Apr 25, 2011 at 1:21
  • My apologies, I forgot to answer your second question. Everyday use, browsing, a few games, listening to music, and managing my photographs.
    – Alan
    Apr 25, 2011 at 1:26
  • That sounds like normal usage, and you've got plenty of RAM. The only reason to tweak your swap settings would be curiosity about the results.
    – bgvaughan
    Apr 25, 2011 at 1:31
1

Well, Swap is used to increase the amount of Virtual memory the system has, but it's only of use if you max out your RAM.

It uses a chunk of the Hard drive as RAM, but since it's not proper physical RAM it's slower than actual RAM, the transfer rates of a hard drive are slower than those of RAM.

0
1

with that amount of ram, it will probably never touch the swap file anyway, but just in case, make the "swapiness" between 0 and 10. it actually solved my flash playback issues and some more dramatic performance increases as well. 1gb ram and (someone send me a better processor, prefereably amd.) a 3.06ghz celeron.

id say do it anyway, cause you have nothing to lose.

0

Swap space is required not only for virtual memory but also it requires if you need hibernation. Also, it is not at all true that system doesn't use swap space. Swap space is being used while running large programs such as Libre Office or GIMP or video editors. The relevance of swap space lays when at any moment system to handle a large amount of memory and it can rely upon swap space to get rid of it.

Moreover, there are many opinions pertaining to how much swap space required in a system. Well, it actually depends upon amount of RAM. If memory is low as 500 MB almost double of SWAP space can be set up. For a machine with 1 GB ram, 1 GB ram is sufficient. I have setup 2 GB swap space for my 1 GB netbook with atom processor. However, I could notice system is using nearly 300-400 MB of swap space while it is running busy.

You can check it by using command free in terminal.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .