Hello
so im trying to understand how Ram works to give people who have old pcs a precise answer on which linux distro suit them (DE/WM)
so i have been testing MX 21 on virtualbox wih those settings :
https://i.imgur.com/m4NrcjH.png
and this is the test , i noticed that when i give the OS 1.5 GB ram it saves some data on swap (SSD i beleive which makes the experience slow for HDD low system environement) so does this mean that 1.5 is not inaff ? does this mean that ram will slow down the PC ?
https://i.imgur.com/fiCWpNs.png
and it gets worst when i give the OS 1GB ( when i open youtube etc it saves more data into swap)
https://i.imgur.com/UggH7uf.png
and with 2 GB Ram it doesnt save any data to SWAP
the question is why in the 1.5 gb ram test the system is saving data into swap when there is still free space on RAM ? is this the kernel bad ram management in cases like this or it's something else ? and what if i run system without swap in 1 + 1.5 gb ram settings is it better in some cases to delete swap ?
for A pentium 4 (3.2 ghz) and (512 x 2 = 1 GB ram) what is going to make the experience better if i can only choose one is it upgrading to 2GB ram or to Quad core CPU with 1 GB ram ?
Thank u for reading
MX using sawp when Ram is free ? [Solved]
-
- Posts: 31
- Joined: Mon Oct 25, 2021 8:37 pm
MX using sawp when Ram is free ?
Last edited by Touhami-Dz on Wed Dec 29, 2021 11:41 am, edited 2 times in total.
Re: MX using sawp when Ram is free ?
Google provide many results such as this: https://www.tothenew.com/blog/understan ... -in-linux/
Perhaps you can glean what you require from these sites.
Perhaps you can glean what you require from these sites.
Pax vobiscum,
Mark Rabideau - ManyRoads Genealogy -or- eirenicon llc. (geeky stuff)
i3wm, bspwm, hlwm, dwm, spectrwm ~ Linux #449130
"For every complex problem there is an answer that is clear, simple, and wrong." -- H. L. Mencken
Mark Rabideau - ManyRoads Genealogy -or- eirenicon llc. (geeky stuff)
i3wm, bspwm, hlwm, dwm, spectrwm ~ Linux #449130
"For every complex problem there is an answer that is clear, simple, and wrong." -- H. L. Mencken
Re: MX using sawp when Ram is free ? [Solved]
Linux manages the usage of the swap file with the "swappiness" value which is represented as a number from 0 to 100. You will find a lot of results on Google when you look up that term.
In short, the lower the value, the less the kernel will use the swap file. 0 disables swap completely.
To look up the current setting, use
You can change the value during runtime and see if you like the effects.
To make it persistent, add the following line into /etc/sysctl.conf
From my experience, you want to set swappiness to a very low non-0 value on any desktop system. Using the swap usually comes with a huge performance penalty, so the system should try to avoid using it as long as possible. Of course, it also depends on the given usecase. I run all my Linux desktops with swappiness 1.
In short, the lower the value, the less the kernel will use the swap file. 0 disables swap completely.
To look up the current setting, use
Code: Select all
cat /proc/sys/vm/swappiness
Code: Select all
sudo sh -c 'echo 10 > /proc/sys/vm/swappiness'
Code: Select all
vm.swappiness = 10
From my experience, you want to set swappiness to a very low non-0 value on any desktop system. Using the swap usually comes with a huge performance penalty, so the system should try to avoid using it as long as possible. Of course, it also depends on the given usecase. I run all my Linux desktops with swappiness 1.
If it ain't broke, don't fix it.
Main: MX 23 | Second: Mint 22 | HTPC: Linux Lite 7 | VM Machine: Debian 12 | Testrig: Arch/FreeBSD 14 | Work: RHEL 8
Main: MX 23 | Second: Mint 22 | HTPC: Linux Lite 7 | VM Machine: Debian 12 | Testrig: Arch/FreeBSD 14 | Work: RHEL 8
Re: MX using sawp when Ram is free ?
... I run all my Linux desktops with swappiness 5 or 10, if HDD (1 is probably better for SSD). And vfs_cache_pressure 50 instead 100.
Pour les nouveaux utilisateurs: Alt+F1 pour le manuel, ou FAQS, MX MANUEL, et Conseils Debian - Info. système “quick-system-info-mx” (QSI) ... Ici: System: MX-19_x64 & antiX19_x32
- dolphin_oracle
- Developer
- Posts: 22099
- Joined: Sun Dec 16, 2007 12:17 pm
Re: MX using sawp when Ram is free ?
mx 21 sets the default to swappiness to 15.
Code: Select all
cat /etc/sysctl.d/99-swappiness_mx.conf
vm.swappiness = 15
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.
Re: MX using sawp when Ram is free ?
... Yes it's the right place for the changes (even into MX19) ... 15 instead 60 by default is fine too for a desktop (not a server).dolphin_oracle wrote: Sat Jan 01, 2022 3:07 pm mx 21 sets the default to swappiness to 15.Code: Select all
cat /etc/sysctl.d/99-swappiness_mx.conf vm.swappiness = 15
Pour les nouveaux utilisateurs: Alt+F1 pour le manuel, ou FAQS, MX MANUEL, et Conseils Debian - Info. système “quick-system-info-mx” (QSI) ... Ici: System: MX-19_x64 & antiX19_x32
Re: MX using sawp when Ram is free ?
As I consider, others gave you a pretty good hint to figure out why you have this behavior (vm.swappiness), I just want to say the type of CPU you have will not change anything on that, but yes adding RAM will help you in anycase to perceive a better experience; if I were you I would look to boost it at least with 4GB or RAM.Touhami-Dz wrote: Wed Dec 29, 2021 6:56 am the question is why in the 1.5 gb ram test the system is saving data into swap when there is still free space on RAM ? is this the kernel bad ram management in cases like this or it's something else ? and what if i run system without swap in 1 + 1.5 gb ram settings is it better in some cases to delete swap ?
for A pentium 4 (3.2 ghz) and (512 x 2 = 1 GB ram) what is going to make the experience better if i can only choose one is it upgrading to 2GB ram or to Quad core CPU with 1 GB ram ?
Thank u for reading
BTW: this is not a kernel bad RAM management, it's a choice made by MX Team, which in most of the case will be a pretty smart one.
Re: MX using sawp when Ram is free ?
Ah, I did not know there were dedicated config files for sysctl.d in MX Linux. That's pretty neat.
I usually go straight into /etc/sysctl.conf after any fresh Linux install. I will keep that in mind.
I usually go straight into /etc/sysctl.conf after any fresh Linux install. I will keep that in mind.
If it ain't broke, don't fix it.
Main: MX 23 | Second: Mint 22 | HTPC: Linux Lite 7 | VM Machine: Debian 12 | Testrig: Arch/FreeBSD 14 | Work: RHEL 8
Main: MX 23 | Second: Mint 22 | HTPC: Linux Lite 7 | VM Machine: Debian 12 | Testrig: Arch/FreeBSD 14 | Work: RHEL 8