Swap control How to set when swap is used

Moderator: Forum moderators

Post Reply
User avatar
bigpup
Moderator
Posts: 7042
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 925 times
Been thanked: 1537 times

Swap control How to set when swap is used

Post by bigpup »

Swapeness control is in

/etc/sysctl.conf

Change or adding the line

Code: Select all

#Set swappiness value
vm.swappiness=10
The number is the percentage point of how much free RAM there is.
When free RAM reaches this point, swap is used.

Set with the value to your preference.

How to Manage Swap Usage in Linux
https://www.maketecheasier.com/manage-swap-usage-linux/

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
vtpup
Posts: 746
Joined: Sat Aug 15, 2020 2:34 pm
Location: Republic of Vermont
Has thanked: 198 times
Been thanked: 172 times
Contact:

Re: Swap control How to set when swap is used

Post by vtpup »

I didn't have /etc/sysct.conf as a file in either Tahrpup, or Bionicpup64, so I added it to enter those lines.

HP Envy Laptop 17t-cr100
Fossapup F-96 CE rev 4
Huge kernel: huge-6.1.8-fossapup64

My homemade foam boat:
www.youtube.com/watch?v=4sDubB0-REg

User avatar
bigpup
Moderator
Posts: 7042
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 925 times
Been thanked: 1537 times

Re: Swap control How to set when swap is used

Post by bigpup »

It is not /etc/sysct.conf

It is /etc/sysctl.conf

Did you actually have a swap partition or swap file made?
Computer booted with the swap loaded?

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

Post Reply

Return to “Tips & Tweaks”