You are Here:
Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section



Changing Swappiness

Author (Read 9199 times)

0 Members and 4 Guests are viewing this topic.

Re: Changing Swappiness
« Reply #15 on: February 02, 2018, 02:45:44 PM »
 

Moltke

  • Platinum Level Poster
  • **********
  • 1134
    Posts
  • Reputation: 126
  • Linux Lite Member
    • View Profile

  • CPU: amd athlon 64 x2

  • MEMORY: 4Gb

  • VIDEO CARD: amd radeon hd 6750

  • Kernel: 5.x
@JanetBiggar  just so you know I tried in a Virtual Machine with only 1gb RAM changing swappiness to 1 and I did noticed some improvement in performance, so you might want to try this and see how it goes in your system. When deleting the "#" in the file change that =10 to =1, save, close nano, reboot and check for yourself. :)
Without each others help there ain't no hope for us :)
Need a translation service? https://www.deepl.com/es/translator
 

Re: Changing Swappiness
« Reply #14 on: February 02, 2018, 10:34:47 AM »
 

JanetBiggar

  • PayPal Supporter
  • I come here a lot
  • *****
  • 252
    Posts
  • Reputation: 10
  • Linux Lite Member
    • View Profile
    • iizidima
This is helpful, when I get a chance I will remove the #, resave then reboot and check.

Much appreciated 😁
 

Re: Changing Swappiness
« Reply #13 on: February 01, 2018, 10:45:04 AM »
 

Moltke

  • Platinum Level Poster
  • **********
  • 1134
    Posts
  • Reputation: 126
  • Linux Lite Member
    • View Profile

  • CPU: amd athlon 64 x2

  • MEMORY: 4Gb

  • VIDEO CARD: amd radeon hd 6750

  • Kernel: 5.x
@JanetBiggar if that line in your systcl.conf file
Quote
# vm.swappiness=10
looks like this do as @firenice03 says cause that's what preventing the order to remain once you reboot the system, comment it out; delete the "#" symbol in front of it, save the file, close nano, reboot and that should be it.
Without each others help there ain't no hope for us :)
Need a translation service? https://www.deepl.com/es/translator
 

Re: Changing Swappiness
« Reply #12 on: February 01, 2018, 07:38:27 AM »
 

firenice03

  • Rockin' the FREE World
  • Global Moderator
  • Platinum Level Poster
  • *****
  • 1848
    Posts
  • Reputation: 284
  • Linux Lite Member
    • View Profile

  • CPU: AMD E2//Atom X5//AMD Phenom II X2

  • MEMORY: 4Gb

  • VIDEO CARD: AMD Mullin Radeon R2//Intel//AMD/ATI RS880

  • Kernel: 5.x
I just checked and there’s is no line indicating “vm.swappiness=60”

I can still see my line at the bottom # vm.swappiness=10 that I had added then saved, but no other reference to swappiness.

Just curious, IF I had changed the swappiness to 10 BEFORE upgrading from LL 3.4 to 3.6 would the swappiness of 10 have stayed at 10?

I’m setting this computer up today with the youth that originally was using it when it was running XP so may have to wait till a later chance to try any other suggestions...

Not to jump in but if your line reads as you have it "# vm.swappiness=10"
Remove the comment from the beginning; the "#"
That "#" is telling the file to skip that line...
LL4.8 UEFI 64 bit ASUS E402W - AMD E2 (Quad) 1.5Ghz  - 4GB - AMD Mullins Radeon R2
LL5.8 UEFI 64 bit Test UEFI Kangaroo (Mobile Desktop) - Atom X5-Z8500 1.44Ghz - 2GB - Intel HD Graphics
LL4.8 64 bit HP 6005- AMD Phenom II X2 - 8GB - AMD/ATI RS880 (HD4200)
LL3.8 32 bit Dell Inspiron Mini - Atom N270 1.6Ghz - 1GB - Intel Mobile 945GSE Express  -- Shelved
BACK LL5.8 64 bit Dell Optiplex 160 (Thin) - Atom 230 1.6Ghz - 4GB-SiS 771/671 PCIE VGA - Print Server
Running Linux Lite since LL2.2
 

Re: Changing Swappiness
« Reply #11 on: February 01, 2018, 06:44:35 AM »
 

JanetBiggar

  • PayPal Supporter
  • I come here a lot
  • *****
  • 252
    Posts
  • Reputation: 10
  • Linux Lite Member
    • View Profile
    • iizidima
I just checked and there’s is no line indicating “vm.swappiness=60”

I can still see my line at the bottom # vm.swappiness=10 that I had added then saved, but no other reference to swappiness.

Just curious, IF I had changed the swappiness to 10 BEFORE upgrading from LL 3.4 to 3.6 would the swappiness of 10 have stayed at 10?

I’m setting this computer up today with the youth that originally was using it when it was running XP so may have to wait till a later chance to try any other suggestions...
 

Re: Changing Swappiness
« Reply #10 on: February 01, 2018, 06:33:17 AM »
 

Moltke

  • Platinum Level Poster
  • **********
  • 1134
    Posts
  • Reputation: 126
  • Linux Lite Member
    • View Profile

  • CPU: amd athlon 64 x2

  • MEMORY: 4Gb

  • VIDEO CARD: amd radeon hd 6750

  • Kernel: 5.x
Hi @JanetBiggar

Type
Code: [Select]
$ sudo nano /etc/sysctl.conf and check if there's a "line vm.swappiness=60" in that file, if it does exists that might be the problem, delete it or comment it; add a "#" in front of it, then press Ctrl+O, hit enter to save changes and Ctrl+X to close nano.

Hope this helps! :)
Without each others help there ain't no hope for us :)
Need a translation service? https://www.deepl.com/es/translator
 

Re: Changing Swappiness
« Reply #9 on: February 01, 2018, 05:01:38 AM »
 

Artim

  • Always Learning
  • PayPal Supporter
  • Gold Level Poster
  • *****
  • 541
    Posts
  • Reputation: 67
  • Lieutenant Commander, Confederate Space Force
    • View Profile
    • Confessions of a Technophobe

  • CPU: Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz

  • MEMORY: 3Gb

  • VIDEO CARD: Mobile GM965/GL960 Integrated Graphics Controller

  • Kernel: 5.x
2 GB of RAM is better at 10 than 60.
 

Re: Changing Swappiness
« Reply #8 on: February 01, 2018, 01:15:22 AM »
 

JanetBiggar

  • PayPal Supporter
  • I come here a lot
  • *****
  • 252
    Posts
  • Reputation: 10
  • Linux Lite Member
    • View Profile
    • iizidima
Thanks for the steps Moltke, I gave it a go, but despite confirming that the file was saved with the change to swappiness of 10, after rebooting it still shows 60.

The temporary fix does work if that is helpful to know although as you mention this reverts to 69 once rebooted.

With a RAM of 2G will it make that much difference if I leave it at 60?
 

Re: Changing Swappiness
« Reply #7 on: January 30, 2018, 11:44:38 PM »
 

Moltke

  • Platinum Level Poster
  • **********
  • 1134
    Posts
  • Reputation: 126
  • Linux Lite Member
    • View Profile

  • CPU: amd athlon 64 x2

  • MEMORY: 4Gb

  • VIDEO CARD: amd radeon hd 6750

  • Kernel: 5.x
Hi @JanetBiggar

Quote
I tried to see if I could "save" the changes in terminal command line, but no choice to save.  I think I'm missing something.
To save the file on nano press Ctrl+O, you'll be asked to save the changes made to the file, hit enter to confirm, then Ctrl+X to close.

Then type
Code: [Select]
$ cat /proc/sys/vm/swappiness to verify the changes have been made.

Quote
I also tried the:
sysctl -w vm.swappiness=1

I think you should try with the sudo command
Code: [Select]
$ sudo sysctl -w vm.swappiness=1
Without each others help there ain't no hope for us :)
Need a translation service? https://www.deepl.com/es/translator
 

Re: Changing Swappiness
« Reply #6 on: January 30, 2018, 11:28:12 PM »
 

JanetBiggar

  • PayPal Supporter
  • I come here a lot
  • *****
  • 252
    Posts
  • Reputation: 10
  • Linux Lite Member
    • View Profile
    • iizidima
Hi Moltke,
Well the temporary change to 10 works, however when I try the permanent line it does't work, however it may be that I'm missing a step.  When I put in the "sudo nano..." line I get a bunch of text, then I add the "vm swappiness=10" at the bottom and then I simply close the file.

I seem to recall in the very first link I mentioned above that I had to save the file...I tried to see if I could "save" the changes in terminal command line, but no choice to save.  I think I'm missing something.

I also tried the:
sysctl -w vm.swappiness=1
However I get this following message below the above command:
sysctl: permission denied on key 'vm.swappiness'

Not sure what to do.  I have RAM of 2GB so it not horrible so thinking 10 would be ok, but can't seem to get a permanent change to 10
 

Re: Changing Swappiness
« Reply #5 on: January 30, 2018, 05:05:45 PM »
 

Moltke

  • Platinum Level Poster
  • **********
  • 1134
    Posts
  • Reputation: 126
  • Linux Lite Member
    • View Profile

  • CPU: amd athlon 64 x2

  • MEMORY: 4Gb

  • VIDEO CARD: amd radeon hd 6750

  • Kernel: 5.x
@JanetBiggar  I also found this article https://rudd-o.com/linux-and-free-software/tales-from-responsivenessland-why-linux-feels-slow-and-how-to-fix-that and the author suggest to change swappiness to 1 by running this command:
Code: [Select]
sysctl -w vm.swappiness=1 It's supposed to do a better job than change it to 10, you could try that if that pc of yours is really short of RAM. The article also explains why to change swappiness default value, is a nice reading overall. :)
Without each others help there ain't no hope for us :)
Need a translation service? https://www.deepl.com/es/translator
 

Re: Changing Swappiness
« Reply #4 on: January 30, 2018, 03:07:01 PM »
 

JanetBiggar

  • PayPal Supporter
  • I come here a lot
  • *****
  • 252
    Posts
  • Reputation: 10
  • Linux Lite Member
    • View Profile
    • iizidima
Thanks Moltke I will give it a try tomorrow. This list is great, it’s so supportive which is indispensable to newbies like me.

The unlockme that random boy mentioned sounds interesting, however safer for me to do the specific steps Moltke mentioned at least for now  ;)
 

Re: Changing Swappiness
« Reply #3 on: January 30, 2018, 05:27:45 AM »
 

Artim

  • Always Learning
  • PayPal Supporter
  • Gold Level Poster
  • *****
  • 541
    Posts
  • Reputation: 67
  • Lieutenant Commander, Confederate Space Force
    • View Profile
    • Confessions of a Technophobe

  • CPU: Intel(R) Core(TM)2 Duo CPU T7300 @ 2.00GHz

  • MEMORY: 3Gb

  • VIDEO CARD: Mobile GM965/GL960 Integrated Graphics Controller

  • Kernel: 5.x
@ralphy has a cool graphical tool for doing that too, called Unlockme.  It does all kindsa stuff in one very simple GUI.  Nice for lazy people, newbies, and technophobic kids.
 

Re: Changing Swappiness
« Reply #2 on: January 30, 2018, 04:36:37 AM »
 

Moltke

  • Platinum Level Poster
  • **********
  • 1134
    Posts
  • Reputation: 126
  • Linux Lite Member
    • View Profile

  • CPU: amd athlon 64 x2

  • MEMORY: 4Gb

  • VIDEO CARD: amd radeon hd 6750

  • Kernel: 5.x
Hi @JanetBiggar

To change swappiness, in a terminal type the following command:

Code: [Select]
sudo sysctl vm.swappiness=10
To verify changes run
Code: [Select]
cat /proc/sys/vm/swappiness
However, you'll have to run this command reboot after reboot. To make it permanent, type in a terminal:

Code: [Select]
sudo nano /etc/sysctl.conf scroll to the bottom of that text file and add

Code: [Select]
vm.swappiness=10
Repeat the process to verify changes and that should be it.

Hope this helps! :)
Without each others help there ain't no hope for us :)
Need a translation service? https://www.deepl.com/es/translator
 

Changing Swappiness
« Reply #1 on: January 30, 2018, 02:15:21 AM »
 

JanetBiggar

  • PayPal Supporter
  • I come here a lot
  • *****
  • 252
    Posts
  • Reputation: 10
  • Linux Lite Member
    • View Profile
    • iizidima
I'm trying to change the swappiness on an older computer from 60 to 10 and have always followed the following article section 1.1:https://sites.google.com/site/easylinuxtipsproject/3

However, this particular computer I upgraded to LL 3.6 and when I cut and paste the get leafpad line it says it is already updated and hence no file appears into which I can cut and paste the next line in the following step.

Is someone able to give me the steps to reduce swapiness to 10 given that this computer is running LL 3.6?

Thanks in advance.
« Last Edit: January 30, 2018, 11:12:12 PM by JanetBiggar »
 

 

-->
X Close Ad

Linux Lite 6.6 FINAL Released - Support for 22 Languages Added - See Release Announcement Section