swap make pc slow after a while

New to Puppy and have questions? Start here

Moderator: Forum moderators

Post Reply
User avatar
AntonioPt
Posts: 306
Joined: Wed Aug 11, 2021 7:41 pm
Has thanked: 130 times
Been thanked: 55 times

swap make pc slow after a while

Post by AntonioPt »

Hello all and especial @peebee
So i got a question after 2 weeks running my LunarPup i notice my swap was allmost full and i wasn't doing much in my machine basicly listen to music irc most of the time

So my question is how can i clean swap once in a while i know i need to use swapoff -a and swapon -a to clean it but is there an automatic way to do it ? since i notice after a while pc was slow because of that txx in advange

Swap: 1,9 GiB Total (713,7 MiB Free) After 2 weeks straight :D
Swap: 1,9 GiB Total (1,8 GiB Free) after i run swapoff -a and swapon -a

Why astronauts use Linux
Because you can't open windows in space

User avatar
wizard
Posts: 2169
Joined: Sun Aug 09, 2020 7:50 pm
Location: Oklahoma, USA
Has thanked: 2980 times
Been thanked: 799 times

Re: swap make pc slow after a while

Post by wizard »

@AntonioPt

You could make a simple bash script that runs swapoff -a and swapon -a, then set it up as a pschedule task.

wizard

Big pile of OLD computers

User avatar
mikewalsh
Moderator
Posts: 6518
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 993 times
Been thanked: 2170 times

Re: swap make pc slow after a while

Post by mikewalsh »

@AntonioPt :-

Coupla questions.....if I may?

- How much RAM does your machine have in total?
- What do you have your "swappiness" level set to? My guess is that it's still set to the default setting of '60', which is what all distros ship with by default, OOTB...

Mike. ;)

User avatar
AntonioPt
Posts: 306
Joined: Wed Aug 11, 2021 7:41 pm
Has thanked: 130 times
Been thanked: 55 times

Re: swap make pc slow after a while

Post by AntonioPt »

Hello @mikewalsh and @wizard
hope all good some here :)
wizard im about to do that :D i have read this article https://askubuntu.com/questions/1357/ho ... s-free-ram that @Pikaxhu send me but still no luck unless i make the script "me guessing" :D

mikewalsh so my machine has 1gb of ram so its ... :D
- What do you have your "swappiness" level set to? well lunarpup didn't have no settings so i add it in /etc/sysctl.conf this vm.swappiness=10 but still nuthing but im think im gonna make a script or use the one that is in the article i just share

Best regards António

Why astronauts use Linux
Because you can't open windows in space

hikohan
Posts: 48
Joined: Wed Mar 13, 2024 12:08 am
Has thanked: 8 times
Been thanked: 13 times

Re: swap make pc slow after a while

Post by hikohan »

After run full backup or Browser Chat several hours,
swap useage may increase and cause Puppy performance slower...

Add follow script in pSschedule cron every hour or run it manually.

Code: Select all

#!/bin/sh

echo 1 > /proc/sys/vm/drop_caches
sync
echo 2 > /proc/sys/vm/drop_caches
sync

swapoff -a
sleep 1
swapon -a

This works for me. Enjoy your Puppy Linux! :thumbup2:

Conky could monitor system CPU/Memory/Swapping/Storage usage every seconds on desktop.

Attachments
Screenshot.png
Screenshot.png (84.66 KiB) Viewed 258 times
Post Reply

Return to “Beginners Help”