1752803 Members
5464 Online
108789 Solutions
New Discussion юеВ

Re: swap usage in V3

 
SOLVED
Go to solution
Davis Paul
Valued Contributor

Re: swap usage in V3

Dear Michael Steele,
There is no maxswapchunks parameter in 11.31 hp-ux system. I cannot play with the formula.

Davis Paul.
Michael Steele_2
Honored Contributor
Solution

Re: swap usage in V3

Hi

Sorry, gave you 11.11 information. In 11.23 and 11.31 refer to swchunk

http://docs.hp.com/en/B2355-60130/swchunk.5.html

Thanks for catching that.
Support Fatherhood - Stop Family Law
Davis Paul
Valued Contributor

Re: swap usage in V3

Dear Michael Steele,

# kctune |grep swchunk
swchunk 65536 65536
My question is still remains unanswered. Above is the swchunk value set as maximum. Can you tell me how can I use maximum physical memory ? Here in the swapinfo output reserve memory is "reserve - 15251 -15251". Why this much memory is reserved ?



Don Morris_1
Honored Contributor

Re: swap usage in V3

Because it was required for the virtual objects your applications/workloads created.

Read over http://docs.hp.com/en/5965-4641/ch01s09.html (or any of the many, many other times this question has come up). You want the sections on "swap reservation" and "pseudo-swap".

As I said before, you are not only using all of physical memory -- you are *over subscribed* on physical memory (which is why you're consuming actual disk swap).
Michael Steele_2
Honored Contributor

Re: swap usage in V3

swchunk = number of blocks that will be placed on one swap device


Minimum: 2048 blocks

Maximum: 65536 blocks

Note that the minimum (or default) value of swchunk therefore allows 4,096 TB of swap space.

The total bytes of swap space manageable by the system is swchunk * 1 KB * 2,147,483,648 (the system maximum number of swap chunks in the swap table).

############################

Your swchunk is currently 65526, the MAX, and it is mis configured since you are stating you now have 128 TB of swap.

Swap= 2,147,483,648 * 1024 * 65536 = 144115188075855872 / 1024 ** 5 = 128 TB of swap

############################

The default swchunk value is 2048 and it allows for 4 TB of swap.

Swap= 2,147,483,648 * 1024 * 2048 = 4503599627370496 / 1024 ** 5 = 4 TB of swap default

############################

By default then, without changing anything, your swap will allow for 4 TB of swap. Well this is insane. You want as much in RAM as possible in order to eliminate disk I/O.

a) change your current swchunk back to 2048.
b) Get as much swap into RAM as possible.
c) Eliminate all 2ndary swap.

Note: This is what you have now - 2ndary swap is written in round robin interleave fashion and not similtaneously or in parallel. I.e., Going up one block of primary swap, then one block of 2ndary, then a 3rd block of 2ndary - Coming down one block of 2ndary, then another block of 2ndary then a 3rd block of primary.

Verses the misunderstanding that one block of primary and one block of 2ndary and a 2nd block of 2ndary are all written similtaneously in parallel. This is not how your swap writes. It does not write in parallel!

So even this algorithm tells you that the use of 2ndary swap is less efficient.
##########################
total 48323 27450 20873 57% - 0 -
Right now you are using 27 GB of swap with 48 GB configured.
Sigh.
Run this command for me and total up the VSZ column, the first column and post or attach both please. I can't believe this total will come close to 27 GB but we'll see.
UNIX95=ps -ef -o vsz,pid,comm | sort -rn

d) Total virtual memory consumed by all processes.
Support Fatherhood - Stop Family Law
Michael Steele_2
Honored Contributor

Re: swap usage in V3

typo ...

Note that the minimum (or default) value of swchunk therefore allows 4,096 TB of swap space.

should be 128 TB not 4,096
Support Fatherhood - Stop Family Law
Michael Steele_2
Honored Contributor

Re: swap usage in V3

Follow up to find total memory consumed, in researching this, please compare the above UNIX95 calculation with Glance Memory report. Looks like the UNIX95 command is going to miss some things.
Support Fatherhood - Stop Family Law
Davis Paul
Valued Contributor

Re: swap usage in V3

I used kmeminfo tool to get the memory usage and found that there is no free memory.
Thanks to all.