1819791 Members
3282 Online
109607 Solutions
New Discussion юеВ

swapinfo -tam question

 
SOLVED
Go to solution
gerjam
Advisor

swapinfo -tam question

Hi,

I just need more explanation on the swapinfo -tam output:

#swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE VAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1024 0 1024 0% 0 - 1 /dev/vg00/lvol2
dev 1024 0 1024 0% 0 - 1 /dev/vg00/lvol9
reserve - 907 -907
memory 1722 1048 674 61%
total 3770 1955 1815 52% - 0 -

Please correct me if Im wroing but from hpux man pages of swapinfo, it is said that the memory field is part of the system memory (RAM) used for paging only when all other resources (device and reserve) are used up. How come that the memory usage a above is already 61% but the device paging areas were not even used at all. And also what is meant by the total field?

Thank you very much.
5 REPLIES 5
Bharat Katkar
Honored Contributor
Solution

Re: swapinfo -tam question

Hi,
See this thread ..
Hope that clarifies everything.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=698170
Regards,
You need to know a lot to actually know how little you know
V. Nyga
Honored Contributor

Re: swapinfo -tam question

Hi,

for the total field see the explanation in swapinfo about option -t. It adds all lines above. Note that here it adds your memory and your reserve (I think it's memory for kernel).

For me man pages of swapinfo are also not clear - it's silly to use swap device before RAM. And it seems like HP-UX doesn't really do that.

I didn't read swapinfo so exactly before - because for me it was clear that it uses the RAM first (as it shows).

I don't know if the gurus have an explanation ...

HTH
Volkmar
*** Say 'Thanks' with Kudos ***
Muthukumar_5
Honored Contributor

Re: swapinfo -tam question

When you try with swapinfo -t then,

It will make total of above size informations as,
1024+1024+1722
1048+907
1024+1024-907+674

and % of the new total there.

Try to use as,

swapinfo -dfrM ( without total there)

It will sum up and give % there. It is good to analyse the swapinfo without -t option there.
Easy to suggest when don't know about the problem!
Sridhar Bhaskarla
Honored Contributor

Re: swapinfo -tam question

Hi,

The memory line in swapinfo can be very misleading. When the kernel parameter swapmem_on is enabled, system will allocate 75% of the physical memory as swap. That's just for reservation purposes and nothing else. A simple explanation is that it's just silly to page out to memory by reserving the memory in advance.

As system continues to run, kernel may allocate dynamic memory as well processes may lock memory. So, that memory is not free and will not be available for swap reservations. That is shown as "USED" column in the memory line. It's not to be understood as the memory already used to hold the swapped out pages.

There is another way I look at it. With HP's allocation policy, as the processes spawn, swap will be allocated to ensure future swapping. With this approach, actual memory usage is limited by the amount of device swap configured on the system. So, the old practice was to configure device swap twice the size of memory. However, on large memory systems, there would be no reason why you need to have so much device swap defined if you are not going to use all of the memory. So, HP has invented a way to somehow mitigate the free memory into swap calculations dynamically instead of blindly following 2xmemory device swap formula. However, you may eventually end up configuring 2x memory of device swap if the system is going to effectively use all of the memory.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
gerjam
Advisor

Re: swapinfo -tam question

Thank you for the help!!!!