Here is the definition of swappiness:
https://en.wikipedia.org/wiki/Swappiness
After a close and personal look I noticed that some puppies don't have the file /etc/sysctl.conf
Type "free -m" no quotes in a terminal snd use the example below
Code: Select all
# free -m
total used free shared buffers cached
Mem: 3950 2262 1687 0 407 952
-/+ buffers/cache: 903 3047
Swap: 1953 0 1953
Here is the formula to help you calculate your swap if RAMsize=3950MB :
- 1pct = RAMsize / 100 = 3950 / 100 = 39.5MB
So 10% of your RAM is calculated
10pct = 1pct * 10 = 39.5 * 10 = 395MB
This means that when "10% or less of ram" (395MB) is reached as the available left for program operations, then the PC will start swapping to your swap drive.
To make your system follow this rule, you must alter it as follows:
First
- Make a text file in /etc and name it sysctl.conf. If one exist, go to next step
Code: Select all
# touch /etc/sysctl.conf
- Once /etc/sysctl.conf exists, open it in a text editor
- Add the line
Code: Select all
vm.swappiness = 10
- Save /etc/sysctl.conf
- Navigate to your root startup folder (/root/Startup)
- Make a script and name it set-swappiness
- Open it in a text editor and add:
- Add the line
Code: Select all
#!/bin/sh # Set vm.swappiness: sysctl vm.swappiness=10
- save it
- restart X
Code: Select all
root# cat /proc/sys/vm/swappiness
10
You can adjust the value in both files as you see fit.
I recommend a value of 10 or 15
This should hopefully help some puppies feel somewhat lighter !
In short with the value left at 60 "seems to be the standard in most puppies" your swap is being accessed when there is still 60% of ram left
Swap is a good thing but it is about twice as slow as physical ram !
Making the value of 10 would not access swap until about 10% of physical ram
For convenience I have made a pet :
Swappiness PET
Works in:
Tahrpup
vivid pup
Should work in all puppies !
Please backup your savefile before using !!!!!!!!
Please as always use caution as with any forum pet: "Backup first!