What's your swappiness set to, eh?

For interesting topics. But remember this is a Linux Forum. Do not post offensive topics that are meant to cause trouble with other members or are derogatory towards people of different genders, race, color, minors (this includes nudity and sex), politics or religion. Let's try to keep peace among the community and for visitors.

No spam on this or any other forums please! If you post advertisements on these forums, your account may be deleted.

Do not copy and paste entire or even up to half of someone else's words or articles into posts. Post only a few sentences or a paragraph and make sure to include a link back to original words or article. Otherwise it's copyright infringement.

You can talk about other distros here, but no MX bashing. You can email the developers of MX if you just want to say you dislike or hate MX.
Message
Author
User avatar
mmikeinsantarosa
Developer
Posts: 2192
Joined: Thu May 01, 2014 10:12 am

What's your swappiness set to, eh?

#1 Post by mmikeinsantarosa »

An interesting read about how to adjust your distros' swappiness. Anybody ever tinker with this? My m12 is set to 60. As far as swap size goes, the author suggests:
This is a dedicated space in your hard drive that is usually set to at least twice the capacity of your RAM

Happy Friday!
- mike
LT: MX19.1 Quad Core model: Intel Core i7-6820HQ Kernel: 5.0.0-7.1-liquorix-amd64 x86_64

User avatar
chrispop99
Global Moderator
Posts: 3171
Joined: Tue Jan 27, 2009 3:07 pm

Re: What's your swappiness set to, eh?

#2 Post by chrispop99 »

As I run with plenty of RAM, I always set it to 10. I understand that's a good idea for SSD users also.

Chris
MX Facebook Group Administrator.
Home-built desktop - Core i5 9400, 970 EVO Plus, 8GB
DELL XPS 15
Lots of test machines

User avatar
Eadwine Rose
Administrator
Posts: 11895
Joined: Wed Jul 12, 2006 2:10 am

Re: What's your swappiness set to, eh?

#3 Post by Eadwine Rose »

2 gigs, it's more than plenty.
MX-23.2_x64 July 31 2023 * 6.1.0-18-amd64 ext4 Xfce 4.18.1 * 8core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 525.147.05 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 860EVO * Samsung S24D330 & P2250 * HP Envy 5030

User avatar
mmikeinsantarosa
Developer
Posts: 2192
Joined: Thu May 01, 2014 10:12 am

Re: What's your swappiness set to, eh?

#4 Post by mmikeinsantarosa »

from the article
The swappiness parameter value is stored in a simple configuration text file located in /proc/sys/vm and is named “swappiness”.
Anybody ever tinker with their "swappiness" setting?
LT: MX19.1 Quad Core model: Intel Core i7-6820HQ Kernel: 5.0.0-7.1-liquorix-amd64 x86_64

User avatar
Eadwine Rose
Administrator
Posts: 11895
Joined: Wed Jul 12, 2006 2:10 am

Re: What's your swappiness set to, eh?

#5 Post by Eadwine Rose »

Oh wait.. you are not talking about plain jane swap partition?
MX-23.2_x64 July 31 2023 * 6.1.0-18-amd64 ext4 Xfce 4.18.1 * 8core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 525.147.05 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 860EVO * Samsung S24D330 & P2250 * HP Envy 5030

User avatar
Adrian
Developer
Posts: 8248
Joined: Wed Jul 12, 2006 1:42 am

Re: What's your swappiness set to, eh?

#6 Post by Adrian »

Eadwine Rose wrote:Oh wait.. you are not talking about plain jane swap partition?
It explains in the article, swappiness is a parameter that tells the computer when to swap stuff, by default is 60 so it starts to swap out (write inactive part of the memory to the swap space) when the free memory drops to 60%. If you set swappiness 10 then the computer will start to swap only when the free memory drops to 10%.

User avatar
Jerry3904
Administrator
Posts: 21881
Joined: Wed Jul 19, 2006 6:13 am

Re: What's your swappiness set to, eh?

#7 Post by Jerry3904 »

Eadwine Rose wrote:Oh wait.. you are not talking about plain jane swap partition?
I misunderstood that too, and thought misr was trying to make a funny with the language...
Production: 5.10, MX-23 Xfce, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 16 GB, SSD 120 GB, Data 1TB
Personal: Lenovo X1 Carbon with MX-23 Fluxbox and Windows 10
Other: Raspberry Pi 5 with MX-23 Xfce Raspberry Pi Respin

User avatar
Eadwine Rose
Administrator
Posts: 11895
Joined: Wed Jul 12, 2006 2:10 am

Re: What's your swappiness set to, eh?

#8 Post by Eadwine Rose »

Indeed! :smile:
MX-23.2_x64 July 31 2023 * 6.1.0-18-amd64 ext4 Xfce 4.18.1 * 8core AMD Ryzen 7 2700
Asus TUF B450-Plus Gaming UEFI * Asus GTX 1050 Ti Nvidia 525.147.05 * 2x16Gb DDR4 2666 Kingston HyperX Predator
Samsung 860EVO * Samsung S24D330 & P2250 * HP Envy 5030

User avatar
lucky9
Posts: 475
Joined: Wed Jul 12, 2006 5:54 am

Re: What's your swappiness set to, eh?

#9 Post by lucky9 »

I run the default in all of my operating systems. I've never seen SWAP used in my normal day to day use pattern. Matter of fact I've never seen SWAP used when I've checked memory usage. (I currently have 8 GB of RAM, but never noticed a use when I had 4 GB.)
I do not use anything but up and running or off.
Yes, even I am dishonest. Not in many ways, but in some. Forty-one, I think it is.
--Mark Twain

User avatar
kmathern
Developer
Posts: 2402
Joined: Wed Jul 12, 2006 2:26 pm

Re: What's your swappiness set to, eh?

#10 Post by kmathern »

lucky9 wrote:I run the default in all of my operating systems. I've never seen SWAP used in my normal day to day use pattern. Matter of fact I've never seen SWAP used when I've checked memory usage. (I currently have 8 GB of RAM, but never noticed a use when I had 4 GB.)
I do not use anything but up and running or off.
My machine has 4GB of RAM, but some of it is being used as video memory.

It's not uncommon on my machine to see some swap being used, in fact the free command says it's using a small amount right now.

Code: Select all

$ free -h
             total       used       free     shared    buffers     cached
Mem:          3.2G       2.6G       593M         0B       189M       920M
-/+ buffers/cache:       1.5G       1.7G
Swap:         8.2G        84M       8.2G
I sized my swap partition at 8.2GB, just a little more than my machines 8GB RAM capacity (if I were to add another ram module).

Post Reply

Return to “General”