What is SWAP usage?

Anheanz

Reputable
Apr 17, 2014
191
0
4,710
So i have rainmeter on my computer and one of the applications for it includes CPU usage, Ram usage, and then a 3rd SWAP usage. I understand what the 2 former are, but after [trying] looking up what Swap usage is i couldn't find a clear definition. My Ram hovers around 30-35% at idle with a few programs running, and my swap usage usaually stays pretty close to that, usually around 30%.
If somebody could give me a pretty simple definition of what the swap usage is, that would be great.
 
Solution


Hi,

Swapping is the process of evicting infrequently used application memory from the computer's physical address space yet retaining it within the process's virtual address space. This is done by writing it to a non-volatile backing store called a...


Hi,

Swapping is the process of evicting infrequently used application memory from the computer's physical address space yet retaining it within the process's virtual address space. This is done by writing it to a non-volatile backing store called a swap volume. The swap volume is typically stored on a hard disk as either a swap file on a file system, or as a dedicated swap partition. If an application references the memory that has been evicted from the physical address space the operating system will have to load it from the swap volume back into the physical address space before proceeding. This allows a computer to operate more efficiently by ensuring that high speed memory is populated only with data that is frequently used.

Swap usage is the used capacity of all swap volumes that the operating system is allowed to use.
 
Solution

PassMark

Distinguished
Ideally the operating system should have enough RAM that no swapping to disk is required.
Once you start swapping to disk performance can drop 100 fold and it eventually leads to thrashing.
http://en.wikipedia.org/wiki/Thrashing_(computer_science)
 

TJohn

Reputable
Mar 6, 2015
19
0
4,510
I have the same issue with rainmeter. I have never seen my 24G of main memory higher than 40% utilization. Right now it is at 26% with 27% swap usage. There should be zero swapping going on. Maybe there is a spike during boot-up that causes some swap activity and then it just sits there and never swaps again. So why isn't the sap file cleared out at some point? dunno.
 


The balance of the main memory is comprised of a disk cache. It is often beneficial to evict very infrequently used program memory or paged kernel memory and use the freed space to increase the size of the disk cache. This process is very finely tuned.