What's your swappiness set to, eh?

For interesting topics. But remember this is a Linux Forum. Do not post offensive topics that are meant to cause trouble with other members or are derogatory towards people of different genders, race, color, minors (this includes nudity and sex), politics or religion. Let's try to keep peace among the community and for visitors.

No spam on this or any other forums please! If you post advertisements on these forums, your account may be deleted.

Do not copy and paste entire or even up to half of someone else's words or articles into posts. Post only a few sentences or a paragraph and make sure to include a link back to original words or article. Otherwise it's copyright infringement.

You can talk about other distros here, but no MX bashing. You can email the developers of MX if you just want to say you dislike or hate MX.
Message
Author
User avatar
Gordon Cooper
Posts: 965
Joined: Mon Nov 21, 2011 5:50 pm

Re: What's your swappiness set to, eh?

#11 Post by Gordon Cooper »

Must say that I have never looked to see if swap is being used, have always set it well above the RAM, possibly remembering a few years
back when I was testing a CAD program update before it was released. Running on Win XP, it had been going about 5 minutes when everything went very slow. So I doubled the virtual memory - a piece of HD allocated for the job. This time, slow after 10 minutes, then became worse. Eventually discovered that the author had omitted the codes to clear temporary memory after each calculation so RAM filled up then the virtual memory, no matter how big it was.
Backup: Dell9010, MX-19_B2, Win7, 120 SSD, WD 232GIB HD, 4GB RAM
Primary :Homebrew64 bit Intel duo core 2 GB RAM, 120 GB Kingston SSD, Seagate1TB.
MX-18.2 64bit. Also MX17, Kubuntu14.04 & Puppy 6.3.

User avatar
joany
Posts: 235
Joined: Mon Feb 12, 2007 1:45 pm

Re: What's your swappiness set to, eh?

#12 Post by joany »

The default value of 60 seems awfully high to me. I don't want my HDD thrashing around until the free memory gets down to 10% or so. With 4GB of installed RAM (minus a small amount used for video), I've seldom seen swap used running Linux unless I'm running resource-hungry applications like Snapshot and DeVeDe or when I've allocated 2GB of RAM to a VM running in VirtualBox. Windows used swap all the time, which resulted in a lot of thrashing. I pointed the Windows swapfile to the secondary HDD, to make life easier for the main HDD. Of course I don't run Windows at all any more, so my HDDs should last a long time (knock on wood).
MX-14; 3.12-0.bpo.1-686-pae kernel using 4GB RAM
2.4GHz AMD Athlon 4600+
NVidia GeForce 6150 LE; 304.121 Display Driver
You didn't slow down because you're old; you're old because you slowed down.

User avatar
lucky9
Posts: 475
Joined: Wed Jul 12, 2006 5:54 am

Re: What's your swappiness set to, eh?

#13 Post by lucky9 »

Code: Select all

$ free -h
             total       used       free     shared    buffers     cached
Mem:          7.9G       2.4G       5.5G         0B       145M       1.2G
-/+ buffers/cache:       1.1G       6.8G
Swap:         8.0G         0B       8.0G
This is from a normal session for me.
Yes, even I am dishonest. Not in many ways, but in some. Forty-one, I think it is.
--Mark Twain

antiX-Dave
Developer
Posts: 372
Joined: Mon Apr 16, 2012 4:51 pm

Re: What's your swappiness set to, eh?

#14 Post by antiX-Dave »

I generally work with a kind of mental ratio or balance with swappiness and swap size. No real reason and do not know if it is actually a good way to do things. Just seems to work out well for my figuring.

I like to keep the memory allocation around 4gb total, more is ok.
So for a machine with 1 gb ram I try around 3gb swap, default swappiness
A machine with 2 gb ram, 2gb swap, 50 swappiness
A machine with 3 gb ram 1gb swap, 25 swappiness
4 and up 1gb swap, 10 or less swappiness. The swap I find is just to keep things happy. I don't really think swap is needed at 4gb and above ram for most purposes... but I have seen machines still have plenty of free ram and yet still display hanging / delayed actions due to a lack of swap.

User avatar
Gordon Cooper
Posts: 965
Joined: Mon Nov 21, 2011 5:50 pm

Re: What's your swappiness set to, eh?

#15 Post by Gordon Cooper »

In Linux, does the swappiness remain at the set %, or can it vary because of coding in application software?
Backup: Dell9010, MX-19_B2, Win7, 120 SSD, WD 232GIB HD, 4GB RAM
Primary :Homebrew64 bit Intel duo core 2 GB RAM, 120 GB Kingston SSD, Seagate1TB.
MX-18.2 64bit. Also MX17, Kubuntu14.04 & Puppy 6.3.

User avatar
lucky9
Posts: 475
Joined: Wed Jul 12, 2006 5:54 am

Re: What's your swappiness set to, eh?

#16 Post by lucky9 »

I doubt that applications have any say at all concerning SWAP. That's OS territory.

I've never run without a SWAP. But I used to (long time ago) have problems occasionally when I had two. Per the free -h I have a total of 8 GB due to two disks. sdb was auto partitioned/installed by the Installer I was using having given it the whole disk to auto-install. I've not had any problems with two SWAP partitions in many years.
Yes, even I am dishonest. Not in many ways, but in some. Forty-one, I think it is.
--Mark Twain

User avatar
Gordon Cooper
Posts: 965
Joined: Mon Nov 21, 2011 5:50 pm

Re: What's your swappiness set to, eh?

#17 Post by Gordon Cooper »

Thanks Lucky. Have never had any Swap problems myself, but remembering past XP experiences, was wondering if Swap was completely
managed by the OS, or if a badly written app could rock the boat. On this machine there's more Gigs that I would ever use, so have Swap set to 10 Gigs and I just don't worry about it.
Backup: Dell9010, MX-19_B2, Win7, 120 SSD, WD 232GIB HD, 4GB RAM
Primary :Homebrew64 bit Intel duo core 2 GB RAM, 120 GB Kingston SSD, Seagate1TB.
MX-18.2 64bit. Also MX17, Kubuntu14.04 & Puppy 6.3.

MX-tester
Posts: 31
Joined: Thu Jan 23, 2014 9:18 am

Re: What's your swappiness set to, eh?

#18 Post by MX-tester »

I have machines used for desktop purposes only, (internet, music, movies, etc), & which have 1GB of ram & no swap at all, I don't have any problems using them on a daily basis.

User avatar
Adrian
Developer
Posts: 8267
Joined: Wed Jul 12, 2006 1:42 am

Re: What's your swappiness set to, eh?

#19 Post by Adrian »

I doubt that applications have any say at all concerning SWAP. That's OS territory.
I don't think apps do that regularly, but you can technically have an app running as root modify the swappiness. Let's say that there's a tool that needs for some reason to modify the swappiness, it can simply call this command "sysctl vm.swappiness=xx"

User avatar
whell
Posts: 66
Joined: Sat Sep 26, 2009 1:03 pm

Re: What's your swappiness set to, eh?

#20 Post by whell »

Code: Select all

             total       used       free     shared    buffers     cached
Mem:          1.9G       1.6G       286M         0B        21M       1.4G
-/+ buffers/cache:       249M       1.7G
Swap:         7.9G        81M       7.8G
This is with MX-14's default setting.

Post Reply

Return to “General”