Linux Lite Forums

Software - Support => Other => Topic started by: johnausten13 on June 28, 2020, 03:18:10 AM

Title: Swappiness is still set at 60 in LL5
Post by: johnausten13 on June 28, 2020, 03:18:10 AM
I am still wondering why the swappiness is still set at 60 for Linux Lite 5x. I was expecting that it has been reduced to at least 10 for old HDD and SSD for this upgrade. When I was stil in LL 4.8 with an old HDD, I already reduced my swappiness from 60 to 10. Now in my new SSD, I have reduced mine to 5 for faster performance. High swappiness is IMHO, only fit for servers, and low swappiness will immunize the computer to memory shortages caused by temporary big files.


Code: [Select]
cat /proc/sys/vm/swappiness
Title: Re: Swappiness is still set at 60 in LL5
Post by: Jerry on June 28, 2020, 04:54:17 AM
What's your understanding of swappiness as it pertains to the vast range of hardware configurations out in the wild?

Sent from my mobile phone using Tapatalk

Title: Re: Swappiness is still set at 60 in LL5
Post by: johnausten13 on June 28, 2020, 06:48:36 AM
What's your understanding of swappiness as it pertains to the vast range of hardware configurations out in the wild?

Sent from my mobile phone using Tapatalk

My understanding is that swappiness is more like the equivalent in Windows as 'paging file'. Swappiness value sets a preference for the type of memory pages that will be scanned for potential reclamation. For ageing, mechanical hard drives which are mostly used in Linux like I used to have in laptops, reducing the swappiness value improves anonymous page reclamation and reduce swap partition churn.

Title: Re: Swappiness is still set at 60 in LL5
Post by: Jerry on June 28, 2020, 07:17:04 AM
That isn't what I call an understanding, more akin to some rearranged plagiarism from howtogeek. There is no one size fits as all unfortunately. The same article asks, 'What should Swappiness be set to'? For me, swappiness should remain an individualized, fine tweak setting arrived at by a combination of hardware considered factors.

Sent from my mobile phone using Tapatalk

Title: Re: Swappiness is still set at 60 in LL5
Post by: johnausten13 on June 28, 2020, 06:37:43 PM
That isn't what I call an understanding, more akin to some rearranged plagiarism from howtogeek. There is no one size fits as all unfortunately. The same article asks, 'What should Swappiness be set to'? For me, swappiness should remain an individualized, fine tweak setting arrived at by a combination of hardware considered factors.

Sent from my mobile phone using Tapatalk

Well, paging file was more straight forward than swappiness but yeah, there is no one size fits all. I'm just reminded that Linux is much more accomodating with old hardware compared to Windows, and one of the recommendations out there is to reduce swappiness for faster performance.
Title: Re: Swappiness is still set at 60 in LL5
Post by: Jerry on June 28, 2020, 06:48:32 PM
I am sure threads like this will help other people. Thank you for your contribution.
Title: Re: Swappiness is still set at 60 in LL5
Post by: trinidad on June 29, 2020, 07:03:01 AM
"low swappiness will immunize the computer to memory shortages caused by temporary big files"    Wrong. Good lord. Immunize it right into an OOM state.

https://wiki.archlinux.org/index.php/swap

TC
Title: Re: Swappiness is still set at 60 in LL5
Post by: Moltke on June 29, 2020, 12:38:37 PM
I am still wondering why the swappiness is still set at 60 for Linux Lite 5x. I was expecting that it has been reduced to at least 10 for old HDD and SSD for this upgrade. When I was stil in LL 4.8 with an old HDD, I already reduced my swappiness from 60 to 10. Now in my new SSD, I have reduced mine to 5 for faster performance. High swappiness is IMHO, only fit for servers, and low swappiness will immunize the computer to memory shortages caused by temporary big files.


Code: [Select]
cat /proc/sys/vm/swappiness

I see that in your profile says your system has 6GB of RAM, with that amount a swappiness of 10 seems resonable, however, other users with less RAM available on their systems; 1 or 2GB, a value of 60 might be a better choice since it'll help if and when system needs it. The more the RAM the less swappiness value should be, the less the RAM the more swappiness is better. For instance, a system with 32GB of RAM may not even need swappiness at all. My Desktop pc has 4GB and it barely uses swappiness so I made it 10 logn time ago.
Title: Re: Swappiness is still set at 60 in LL5
Post by: johnausten13 on June 29, 2020, 08:11:13 PM
I am still wondering why the swappiness is still set at 60 for Linux Lite 5x. I was expecting that it has been reduced to at least 10 for old HDD and SSD for this upgrade. When I was stil in LL 4.8 with an old HDD, I already reduced my swappiness from 60 to 10. Now in my new SSD, I have reduced mine to 5 for faster performance. High swappiness is IMHO, only fit for servers, and low swappiness will immunize the computer to memory shortages caused by temporary big files.


Code: [Select]
cat /proc/sys/vm/swappiness

I see that in your profile says your system has 6GB of RAM, with that amount a swappiness of 10 seems resonable, however, other users with less RAM available on their systems; 1 or 2GB, a value of 60 might be a better choice since it'll help if and when system needs it. The more the RAM the less swappiness value should be, the less the RAM the more swappiness is better. For instance, a system with 32GB of RAM may not even need swappiness at all. My Desktop pc has 4GB and it barely uses swappiness so I made it 10 logn time ago.

Thanks Moltke. I used to have 2 GB in my previous 32-bit laptops where I installed LL 4 Series. I was thankful to be able to revive those computers so others can use them especially those transitioning from Windows to Linux. I even changed the styles and icons closer to the 'Windows look' using the Boomerang Project. Searching online to optimize my old PCs lead me to swappiness with respect to RAM with the following recommendations:

1 GB RAM or less - use ZRam
2 GB RAM or less - reduce swappiness to 10
4 GB RAM or more - tame the inode cache / cache management to 50 (Done!)
8 GB RAM or more - put tmp to tmpfs
For SSD - reduce swappiness to 5 for lesser write actions (Done!)

I like Linux Lite a lot because it is highly customizable. I upgraded to LL 5 because I read somewhere online that upgrading to LL 5 will make my scanner work. And it did work.