1833696 Members
3419 Online
110062 Solutions
New Discussion

virtual memory and swap

 
SOLVED
Go to solution

virtual memory and swap

Hello, experts

I would like to understand a couple of things about swap
utilization on my machine


This is output from swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 8192 306 7886 4% 0 - 1 /dev/vg00/SWAP2
dev 8192 307 7885 4% 0 - 1 /dev/vg00/lvol2
reserve - 5128 -5128
memory 6346 3225 3121 51%
total 22730 8966 13764 39% - 0 -

From that I can conclude that I have 22GB of total swap with 14GB not used. My pseudo swap is 6GB ( not used 3.1GB )
and yet I have dev 4% used.
Shouldn't pseudoswap be at a higher usage before the dev pct used go above 0% used?
Is that true that if %used on dev is greated that 0%, my system is paging? If so, how is that my swap is 14GB idle?

Please, clarify.
Thanks
Dimitry

8 REPLIES 8

Re: virtual memory and swap

I forgot to mention, my physical memory is 8GB.

Also, strange enough, glance shows 3.8 GB total virtual
memory. Isn't virtual memory comprise of swap+physical.

How is it less than physical?


Sandip Ghosh
Honored Contributor

Re: virtual memory and swap

This is true. Your server is paging to the device Swap area. But in ideal condition your pseudo swap has to be utilised firs and then your device swap.

Possibly your dbc_max_pct is set to default 50 %. If that is the case reduce it to 15%. Otherwise you can speak to the developer/application vendor regarding the swapping.

Sandip
Good Luck!!!
harry d brown jr
Honored Contributor

Re: virtual memory and swap

Re: virtual memory and swap

# kmtune -q dbc_max_pct
Parameter Value
===============================================================================
dbc_max_pct 15
Frank Slootweg
Honored Contributor

Re: virtual memory and swap

As has been explained in recent threads, when you encounter some but very little (device) swap usage/activity, that is normally caused by the use of memory-mapped files. Quite normal and nothing to worry about.
Jim Butler
Valued Contributor

Re: virtual memory and swap

Other parameters to check are maxdsiz
maxtsiz

besides the dbc_max_pct, which control buffering, these are the largest contiguous memory size you can take, what is the value of maxdsiz?
Man The Bilge Pumps!
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: virtual memory and swap

I might add that there is absolutely no reason to have pseudoswap enabled on your box. It only makes sense on boxes with less swap than physical memory; it's fine in that situation but for you it's just a little overhead for no reason. Remember, pseudoswap doesn't really exist.

Almost certainly, you swap usage is memory-mapped files and nothing to be concerned about.
If it ain't broke, I can fix that.
Frank Slootweg
Honored Contributor

Re: virtual memory and swap

I 'disagree' that "there is absolutely no reason to have pseudoswap enabled on your box. It only makes sense on boxes with less swap than physical memory;".

Also when device swap is more than physical memory, as it is in your case, pseudoswap still gives more 'swap' (= virtual memory) than without pseudoswap.

As mentioned, there can indeed be a little overhead from using pseudoswap, but that is only for compute-bound tasks.