Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Swappiness


  • Please log in to reply
11 replies to this topic

#1 pcpunk

pcpunk

  • Members
  • 5,657 posts
  • ONLINE
  •  
  • Gender:Male
  • Location:Florida
  • Local time:07:13 PM

Posted 17 December 2015 - 05:25 PM

After looking into getting some more performance out of my Acer - I noticed that it is now using 13% Swap with not much else being used, which seems like more than it has in past-but I could be wrong.  Swappiness was set at default of 60, so I set it Temporarily at 10 to see if there is a difference, but there is not?  Do I need to Logout and back in or do I need to change it permanently?

 

CPU in the upper teens and the Memory at about 34% what gives?

 

I have 2gb of RAM and about 2gb of Swap file.


sBCcBvM.png

Created by Mike_Walsh

 

KDE, Ruler of all Distro's

eps2.4_m4ster-s1ave.aes_pcpunk_leavemehere

 


BC AdBot (Login to Remove)

 


#2 pcpunk

pcpunk
  • Topic Starter

  • Members
  • 5,657 posts
  • ONLINE
  •  
  • Gender:Male
  • Location:Florida
  • Local time:07:13 PM

Posted 17 December 2015 - 08:38 PM

Task Manager and Conky are now reporting Zero Swap being used, don't know what is going on there?


sBCcBvM.png

Created by Mike_Walsh

 

KDE, Ruler of all Distro's

eps2.4_m4ster-s1ave.aes_pcpunk_leavemehere

 


#3 cat1092

cat1092

    Bleeping Cat


  • BC Advisor
  • 6,999 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:North Carolina, USA
  • Local time:07:13 PM

Posted 18 December 2015 - 05:46 AM

Actually that means you're good, the less you're using Swap, the better, RAM will always be faster than on a HDD (or even SSD). Using 34% of your memory, are you expecting it to use Swap too? That would be poor Memory Management. 

 

Ideally, you'd not be using Swap until there's no more RAM left to spare, yet I've seen computers use the Swap partition even when not under a lot of strain, some of these had 8GB installed & using a few hundred MiB's of Swap. It makes no sense as to why the RAM is not maxed out, and yet using Swap, this only slows the computer. 

 

Did you check out any of my tips below? As to the Swappiness value, you should set it at 10 & leave it. Like such, first the install of the needed tools. If you have these already & can access the file, skip to the last quote & copy/paste the lines. 

 

 

 

sudo apt-get install gksu leafpad

 

Now for doing it.

 

 

 

gksudo leafpad /etc/sysctl.conf

 

Press Enter.

 

 

 

Scroll to the bottom of the text file and add your swappiness parameter to override the default. Copy/paste the following blue lines:

# Decrease swap usage to a more reasonable level
vm.swappiness=10

 

Make sure to add that line below the last # symbol, if one's there, save the file & reboot. It's permanent. 

 

Here's some other tips that may prove to be of assistance to you. :)

 

http://www.bleepingcomputer.com/forums/t/599534/linux-mintubuntu-users-its-time-to-shift-your-os-into-overdrive/

 

Cat


Edited by cat1092, 18 December 2015 - 06:05 AM.

Performing full disc images weekly and keeping important data off of the 'C' drive as generated can be the best defence against Malware/Ransomware attacks, as well as a wide range of other issues. 


#4 Rocky Bennett

Rocky Bennett

  • Members
  • 2,593 posts
  • ONLINE
  •  
  • Gender:Male
  • Location:New Mexico, USA
  • Local time:05:13 PM

Posted 18 December 2015 - 05:53 AM

Hello guys. I am real new to Linux, I am running Mint 17.3, how would I see my system's performance and see the swap settings and all. Any guaiance is appreciated.


594965_zpsp5exvyzm.png


#5 MadmanRB

MadmanRB

    Spoon!!!!


  • Members
  • 2,789 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:No time for that when there is evil afoot!
  • Local time:07:13 PM

Posted 18 December 2015 - 06:13 AM

Hello guys. I am real new to Linux, I am running Mint 17.3, how would I see my system's performance and see the swap settings and all. Any guaiance is appreciated.

 

This is easily viewed by system monitor, located in your menu.

You can just search for it, usually its in "administration"


Edited by MadmanRB, 18 December 2015 - 06:14 AM.

You know you want me baby!

Proud Linux user and dual booter.

Proud Vivaldi user.

 

ljxaqg-6.png


#6 cat1092

cat1092

    Bleeping Cat


  • BC Advisor
  • 6,999 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:North Carolina, USA
  • Local time:07:13 PM

Posted 18 December 2015 - 06:18 AM

Rocky, it's fairly much like above, the only difference for you would be, is if you're running a SSD. In that case, you'd want to set the swappiness to 1. Otherwise 10 as above. 

 

# Sharply reduce swap inclination
vm.swappiness=1

 

The default is 60, which you can find by running this Terminal command. 

 

 

 

cat /proc/sys/vm/swappiness

 

How to get to 10 or 1, is described in my post above to pcpunk, though if running an SSD, it's best to use the one I've placed in this post. It's important to save the file & reboot for it to take effect. 

 

You may even wish to consider installing TMPFS, shown in my link above, this forces all of your temp files to run in RAM, and when you shutdown or reboot, flushes these away, rather than be saved to drive. Your RAM is the fastest storage in your system, this would apply even if running DDR2 RAM. 

 

http://www.yourownlinux.com/2013/05/speed-up-computers-running-ubuntulinux.html

 

Cat


Edited by cat1092, 18 December 2015 - 06:22 AM.

Performing full disc images weekly and keeping important data off of the 'C' drive as generated can be the best defence against Malware/Ransomware attacks, as well as a wide range of other issues. 


#7 Rocky Bennett

Rocky Bennett

  • Members
  • 2,593 posts
  • ONLINE
  •  
  • Gender:Male
  • Location:New Mexico, USA
  • Local time:05:13 PM

Posted 18 December 2015 - 12:32 PM

Thanks. I would post a screen shot if I could figure out how to do it. I got the screen shot of my system monitor, but because its in PNG I can not post it. I am trying to figure out GIMP so that I can convert the file.


594965_zpsp5exvyzm.png


#8 pcpunk

pcpunk
  • Topic Starter

  • Members
  • 5,657 posts
  • ONLINE
  •  
  • Gender:Male
  • Location:Florida
  • Local time:07:13 PM

Posted 18 December 2015 - 02:30 PM

No need to covert the file Rocky, just use a hosting site.  One that NickAu1 turned me on to...you don't even have to sign up at the last time I was there, tinypic.com.  It is very easy to do at this Forum also, as others can be more difficult.  For this you don't even need it, as you can just type it here.  But here is the Tutorial from Nick:  You can skip installing Shutter if you like and use the built in Screenshot, Shutter is good though...try it when you have time.

 

http://www.bleepingcomputer.com/forums/t/558714/how-to-post-a-screen-shot-linux-style/

 

Figure out Gimp hehehahah, that takes a long time, but it's good.

 

If you want a simple output from terminal to copy paste use this: free -m


Edited by pcpunk, 18 December 2015 - 02:33 PM.

sBCcBvM.png

Created by Mike_Walsh

 

KDE, Ruler of all Distro's

eps2.4_m4ster-s1ave.aes_pcpunk_leavemehere

 


#9 pcpunk

pcpunk
  • Topic Starter

  • Members
  • 5,657 posts
  • ONLINE
  •  
  • Gender:Male
  • Location:Florida
  • Local time:07:13 PM

Posted 18 December 2015 - 03:28 PM

Actually that means you're good, the less you're using Swap, the better, RAM will always be faster than on a HDD (or even SSD). Using 34% of your memory, are you expecting it to use Swap too? That would be poor Memory Management. 

 

Cat

 

Just to follow up cat, I was using 13% swap and 34%RAM for some reason, but that appears to be a little glitch in something else I was doing, installed etc.  Had just installed two things AbiWord and Conky, but had not rebooted as I remember, that may have been the culprit.  All is fine now and did not change swappiness, still at default of 60 - but I'm watching it to see if it actually matters.  Also will consider Zram for this 2gbRAM'ed pc.  Yes, am familiar with swapiness from you guys the first week of being exposed to the Dark Side :hysterical:


sBCcBvM.png

Created by Mike_Walsh

 

KDE, Ruler of all Distro's

eps2.4_m4ster-s1ave.aes_pcpunk_leavemehere

 


#10 Guest_GNULINUX_*

Guest_GNULINUX_*

  • Guests
  • OFFLINE
  •  

Posted 19 December 2015 - 05:46 AM

...of being exposed to the Dark Side :hysterical:

 

 

The Force is strong!

linuxlove.gif

 

Greets!



#11 Rocky Bennett

Rocky Bennett

  • Members
  • 2,593 posts
  • ONLINE
  •  
  • Gender:Male
  • Location:New Mexico, USA

Posted 19 December 2015 - 02:24 PM

You guys. (I love the emoticon GNULINUX.)


594965_zpsp5exvyzm.png


#12 cat1092

cat1092

    Bleeping Cat


  • BC Advisor
  • 6,999 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:North Carolina, USA
  • Local time:05:13 PM

Posted 20 December 2015 - 06:05 AM

 

 

All is fine now and did not change swappiness, still at default of 60 

 

pcpunk, I believe you'll benefit by decreasing Swappiness to 10, as recommended. While it may not be a huge noticeable increase, behind the scenes it will be. :thumbup2:

 

With a fast SSD, have mine set to zero & so far, no troubles, if any arises, will bump it back to 1. Those w/out SSD's should be running at no lower than 10. 

 

 

 

# Sharply reduce swap inclination
vm.swappiness=0

 

 

Good Luck! :thumbup2:

 

Cat


Performing full disc images weekly and keeping important data off of the 'C' drive as generated can be the best defence against Malware/Ransomware attacks, as well as a wide range of other issues. 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users