Swap gets used without need in Tahr 605?

Please post any bugs you have found
Post Reply
Message
Author
User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

Swap gets used without need in Tahr 605?

#1 Post by Rattlehead »

For a while now I've been observing that my Tahr605 gets often sluggish. One day by chance I saw the htop numbers and found that Puppy is using the Swap partition even when RAM usage is very low (see the screenshot).

Research in the forum has shown that there is a bash command called swapoff that dumps the swap partition's contents into ram and then disables it, so that's what I've done and the sluggishness has been greatly reduced (although not totally - maybe because CPU utilization is at times round 90%?). However I'd like to report, and also try to understand, this puzzling phenomenon.

Does anybody know why Tahr does this? Never happened to me in any of the other 8-10 Pupplets that I've used as my stable system before; my understanding was that the swap partition starts to get filled AFTER ram is completely full; I created it long ago just in case, but with its 1Gb ram, my computer has always been far from the need of using it...
Attachments
precise571_swap.png
(5.74 KiB) Downloaded 232 times
tahr605_swap.png
(193.8 KiB) Downloaded 226 times

Sailor Enceladus
Posts: 1543
Joined: Mon 22 Feb 2016, 19:43

#2 Post by Sailor Enceladus »

Here's mine in Slacko 6.9.6.4. What it shows is that swap stuff is not removed even when not needed any more because maybe it can be used again later and it's easier to just keep it there than move it back to ram and even though it says 229M it can probably be overwritten by something else more important when things get tight and all 995MB + 1.95G - 229M is filled up. Your yellow (cache) is indeed filling up your 938MB, I don't think it's a bug I think there is science behind the madness (maybe). :lol:
Attachments
Screenshot.png
(10.31 KiB) Downloaded 203 times

p310don
Posts: 1492
Joined: Tue 19 May 2009, 23:11
Location: Brisbane, Australia

#3 Post by p310don »

Swap gets used when ram is full in windows. In linux it is always used. How much it is utilised depends on the swappiness setting.

You can read about swappiness here:

https://en.wikipedia.org/wiki/Swappiness

User avatar
Rattlehead
Posts: 368
Joined: Thu 11 Sep 2008, 11:40

#4 Post by Rattlehead »

Thank you for the info. How useful!

I did not know about the swappiness thing. After reading the Wikipedia article, there seems to be a trade-off situation in Linux between cache and swap, right?

I checked Tahr's swappiness in the way is indicated in the article ( cat /proc/sys/vm/swappiness) and got the default 60.

In my previous post I said that I had tried the swapoff command. I have to say that, during that session running without swap, my computer clearly showed having a harder time.

So I guess I jumped too soon to conclusion, and I'll have to look for other factor for my sluggishness (main candidates: Palemoon, which I haven't ever used before, or running the latest Flash version via UpdateFlash... surely Flash is a resource hog that gets worse with each version... When I'm listening to music from YouTube and I open a Flash heavy site I sometimes get a hickups or a few seconds of irresponsiveness... although now that I think about it Youtube uses Flash no more... well it's a hog anyway...)

Post Reply