swappiness and performance on a low RAM system?

I'm wondering if people out their will agree with me on this one: on a system at the low end of the system requirements for ubuntu (256 MB/RAM), will increasing the swappiness give a performance boost? My reasoning goes something like this: Most of the slow down results from memory filling up and being forced to swap out inactive pieces to free up memory, right? So if I increase the swappiness, the computer will have to do this less often overall, since it seems as though it would probably free up more memory by swapping out more than it would otherwise, right? Or am i completely missing something?

P.S., what's the default swappiness for hardy?

"Anyone who denies the law of non-contradiction should be beaten and burned until he admits that to be beaten is not the same as not to be beaten, and to be burned is not the same as not to be burned."--Avicenna

Re: swappiness and performance on a low RAM system?

You can look at your current swappiness value

Code:

cat /proc/sys/vm/swappiness

however I don't know if there is a default or if it is adjusted on the fly as it can be. Mine is at 60 and I don't even have a swap partition. I should set it to 0 now that I've looked. I think it was 40 on previous releases of Ubuntu.

As for the rest of the question, I'm just speculating, but the behaviour I had a while ago when I only had that much ram on a machine is that memory filled up with active programs as soon as I had a terminal and firefox open, and I'm guessing it was better to have things that I was currently running in ram than on the hard drive. You can play with your swappiness value by changing it on the fly like this
sudo su root -c "echo NUMBER > /proc/sys/vm/swappiness"
where NUMBER is what you want to set it to.
It's trial and error after that. Just don't set it to 0 with the small amount of ram you have or it will freeze. I wouldn't go below 10, which will probably slow the system way down after some use anyway.

Re: swappiness and performance on a low RAM system?

Originally Posted by teddmeister2

I'm wondering if people out their will agree with me on this one: on a system at the low end of the system requirements for ubuntu (256 MB/RAM), will increasing the swappiness give a performance boost? My reasoning goes something like this: Most of the slow down results from memory filling up and being forced to swap out inactive pieces to free up memory, right? So if I increase the swappiness, the computer will have to do this less often overall, since it seems as though it would probably free up more memory by swapping out more than it would otherwise, right? Or am i completely missing something?

P.S., what's the default swappiness for hardy?

i run on 256mb ram and i leave the swappiness at it's default, which is what works best, i tune else where, the thing i've learned about swap is it works best when you don't mess with it. for example that's say you lower swappiness to the usual 10, which keeps more programs in ram and uses swap less, all of a sudden you use a big program, say open office for example, so now it starts swapping to make room, so get you the slow down while it does it's thing.
now flip, that's say we increase swappiness to say 100, now you get these little pockets of wait time cause it's retrieving from the swap on the hard drive which is slower than ram, because you've asked it to put as much there as it can.

the best way to get performance is to fine tune the setup, for example turning on reduced resources in metacity, changing the programs to lighter alternatives, example swap gedit for leafpad, use simple themes, turn off any animations, don't use truetype fonts, use bitmap fonts(times, helvetica, courier), turn off smoothing and hinting, etc...

there's more you can tweak on the ui end that will give you faster, better results than trying to tweak how the hardware is used.

Re: swappiness and performance on a low RAM system?

Originally Posted by teddmeister2

I'm wondering if people out their will agree with me on this one: on a system at the low end of the system requirements for ubuntu (256 MB/RAM), will increasing the swappiness give a performance boost?
P.S., what's the default swappiness for hardy?

The only thing that will give a performance boost is to increase actual RAM.

Re: swappiness and performance on a low RAM system?

Originally Posted by kerry_s

i run on 256mb ram and i leave the swappiness at it's default, which is what works best, i tune else where, the thing i've learned about swap is it works best when you don't mess with it. for example that's say you lower swappiness to the usual 10, which keeps more programs in ram and uses swap less, all of a sudden you use a big program, say open office for example, so now it starts swapping to make room, so get you the slow down while it does it's thing.
now flip, that's say we increase swappiness to say 100, now you get these little pockets of wait time cause it's retrieving from the swap on the hard drive which is slower than ram, because you've asked it to put as much there as it can.

the best way to get performance is to fine tune the setup, for example turning on reduced resources in metacity, changing the programs to lighter alternatives, example swap gedit for leafpad, use simple themes, turn off any animations, don't use truetype fonts, use bitmap fonts(times, helvetica, courier), turn off smoothing and hinting, etc...

there's more you can tweak on the ui end that will give you faster, better results than trying to tweak how the hardware is used.

just my 2 cents, hope that's understandable i'm kind of tired.

Interesting. I run Ubuntu 10.x on a netbook with SSD hard drive. With swappiness set to normal, the system was just crawling. I reduced swappiness to 10 and the system runs well.

I did try Windows XP on the system, but it was unusable.

The issue with this particular Atom/SSD based netbook is write speed. It has 1GB RAM and fast read speeds.

Re: swappiness and performance on a low RAM system?

Originally Posted by teddmeister2

I'm wondering if people out their will agree with me on this one: on a system at the low end of the system requirements for ubuntu (256 MB/RAM), will increasing the swappiness give a performance boost? My reasoning goes something like this: Most of the slow down results from memory filling up and being forced to swap out inactive pieces to free up memory, right? So if I increase the swappiness, the computer will have to do this less often overall, since it seems as though it would probably free up more memory by swapping out more than it would otherwise, right? Or am i completely missing something?

P.S., what's the default swappiness for hardy?

I have an old and low 256 laptop which I stopped using when I blindly used Windows. I "booted out" Windows and installed Ubuntu 10.04 Lts (sanity at last). My machine eventually began to get slower but still a great OS until I down loaded 10.10 .... it nearly killed off my machine.

I tried all the cleaners but no change I took all my files off and little used progs. Still lots of grey screens and near freezing all the time.

SOLUTION for me came from the repository by the name of BLEACH BITS. I had heard it was harsh likes its name however it is programmable in what it does. I got it clear the usual stuff and all the caches including system cache all the logs and lists. I included "rotated logs" which are logs of older versions and upgrades.

I have reduced RAM demand by 30% and gained 2.3 MB of disc space. That was a few days ago and my old machine is fast, bright and great as it once was. I am keeping Bleached Bits on and will use the config on a regular basis.