Swappiness

This forum is dedicated to basic help and support :

Ask here your questions about basic installation and usage of Mageia. For example you may post here all your questions about getting Mageia isos and installing it, configuring your printer, using your word processor etc.

Try to ask your questions in the right sub-forum with as much details as you can gather. the more precise the question will be, the more likely you are to get a useful answer

Swappiness

Postby Zeeman » May 1st, '20, 04:45

With which command line can I check the swappiness and how should I change the swappiness to 10?
Zeeman
 
Posts: 9
Joined: Jun 1st, '19, 00:50

Re: Swappiness

Postby doktor5000 » May 1st, '20, 11:02

Do you want to change it permanently or only temporarily?
You can check the current setting as root with
Code: Select all
sysctl vm.swappiness

and you can change it during runtime with
Code: Select all
sysctl -w vm.swappiness=10


If you want to change it permanently, you should put vm.swappiness=10 into a file below /etc/sysctl.d/ which is read during boot.

Although it would probably be a good idea if you add some context information on WHY you want to change it, also how much RAM and swap you currently have ?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 15670
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Swappiness

Postby Zeeman » May 1st, '20, 18:24

Hello doktor5000, thanks for the quick response. I have 4GB-RAM (3.9GB) and at the moment is the swappiness 60.
I want change the swappiness permanently but I'm a computer dummy so I don't understand what you mean with vm.swappiness=10 into a file below /etc/sysctl.d/ which is read during boot. I have used before a couple of years Linux mint and it looks a lot easy-er there. but I think it's only that I used it for a few years.
Last edited by Zeeman on May 1st, '20, 18:38, edited 1 time in total.
Zeeman
 
Posts: 9
Joined: Jun 1st, '19, 00:50

Re: Swappiness

Postby doktor5000 » May 1st, '20, 18:37

OK, but WHY do you want to change swappiness in particular?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 15670
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Swappiness

Postby Zeeman » May 1st, '20, 18:48

on all debian and ubuntu they recommend it because linux is used a lot of swappiness.
Decrease the swappiness (important)
1.5. With normal computer use (when you don't have a server), you definitely want to decrease Mint's swappiness . That can make a huge difference to the speed of your system.

You will notice this especially with little RAM (2 GB or less). At 8 GB of RAM or more, you probably won't notice a difference when swapping down.
https://rudd-o.com/linux-and-free-softw ... o-fix-that
https://easylinuxtipsproject.blogspot.c ... iness.html
Zeeman
 
Posts: 9
Joined: Jun 1st, '19, 00:50


Return to Basic support

Who is online

Users browsing this forum: No registered users and 0 guests