1834162 Members
2651 Online
110064 Solutions
New Discussion

Memory

 
SOLVED
Go to solution
System Dude_1
Frequent Advisor

Memory

Dear Friends,

why is my system swapping but memory is still 52% available? Please look at my swapinfo below and advice...

# swapinfo
Kb Kb Kb PCT START/ Kb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 8192000 2635456 5556544 32% 0 - 1 /dev/vg00/lvol2
reserve - 4255624 -4255624
memory 6497808 3127736 3370072 48%
Performance Issue on HP-UX 10.20
8 REPLIES 8
Stefan Farrelly
Honored Contributor

Re: Memory


You do NOT have 52% memory available. The memory column from the swapinfo command shows how many processes in memory coul d be swapped to disk if required. See the manpage on swapinfo.

If Device swap is > 0% then you are OUT of physical ram. In your case youre over 30% used, you are severely out of memory. You should look to try to reduce buffer cache and/or add more ram.
Im from Palmerston North, New Zealand, but somehow ended up in London...
linuxfan
Honored Contributor
Solution

Re: Memory

Hi,

Looks like your system is swapping a lot. You may have a memory bottleneck or you really need more memory on your system.

How much physical memory do you have on the system?
on 10.X
echo physmem/D | adb -k /stand/vmunix /dev/kmem
on 11.X
echo phys_mem_pages/D | adb /stand/vmunix /dev/mem
(multiple the value you get by 4096 to get the physical memory in bytes)

Also check the value of kernel parameter dbc_max_pct(normally you can start of with a value of 15-20, the default of 50 is very high)

You may have to analyze your system, the following link is a good start for that.
http://devresource.hp.com/devresource/Docs/TechPapers/UXPerfCookBook.pdf

-HTH
Ramesh
They think they know but don't. At least I know I don't know - Socrates
Sridhar Bhaskarla
Honored Contributor

Re: Memory

Jamaluddin,

The memory line in the output of your swapinfo indicates the swap that you are using on from the memory. This is a result of the kernel parameter swapmem_on.

You don't have memory available and you need to consider adding more.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Jim Turner
HPE Pro

Re: Memory

Hi,

With all due respect to previous answers, the "memory" line in swapinfo output is more accurately the amount of pseudoswap used (read: "reserved"). Here's the scoop from the swapinfo man page:

memory Memory paging area (also known as pseudo-swap). This is the amount of system memory that can be used to hold pages in the event that all of the above paging areas are used up. See "Paging Allocation" below. This line appears only if memory paging is enabled.

Now, please understand that the above explanation is a colossally stupid description of pseudoswap, and whoever wrote it needs to be kicked in the shins. None of your physical RAM is being used (kernel data structs notwithstanding) for real swapping. Pseudoswap is an imaginary number calculated as 75% of your physical RAM. This make-believe swap space is used for swap reservations only.

As others have mentioned, it appears that you need more RAM, or you need to better utilize the RAM that you have. Check your dbc_max_pct kernel parm. Out of the box, it's set at 50%. (Another HP engineer needs to have his fingernails ripped off with pliers.) Knock that down so that your buffer cache tops out at around 200MB. Better yet, make it static with nbuf or bufpages.

Fire up glance and go to the memory (m) report. If you're getting consistent "VM Reads" and "VM writes", then you are paying a horrible performance price for your lack of RAM.

Cheers,
Jim
System Dude_1
Frequent Advisor

Re: Memory

Dear friends,

Thvm on the reply, my dbc_max_pct is set to 50%. I plan to reduce it to 25% as recommended in on of the documentation. What is the impact if i reduce it by half?
Performance Issue on HP-UX 10.20
Sridhar Bhaskarla
Honored Contributor

Re: Memory

With all due respects to some of the above messages, the %mem shown in the swapinfo -t command is treated as the amount of swap consumed though it is the reserve area. So, in case your total swapinfo -t becomes 100%, though you have memory available, a new process will not start as the kernel doesn't find space to reserve for it's image which I think is a reasonable idea. This is the reason why it's treated as being part of swap, though it is not really a 'swap' as correctly pointed out by Jim.

Regarding your buffer cache, your kernel will die if you allot 50% of your total memory. Amount of buffer cache needed - is really dependent on what you have at the back end. If it is like XP or EMC, you don't need to go for this much buffer cache. I am running with 2% dbc_max_pct on a 12GB system and I am doing excellent.

And it is really dependent on the application. So, you can start it from 5% (if you have a good disk subsystem).

The thing that you need to look at is with sar -b that shows the buffer activity. %rcache above 90 annd %wcache above 80 is a good sign of buffer activity.

Certainly you are misusing your memory by alloting 50% of it to buffer cache.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
linuxfan
Honored Contributor

Re: Memory

Hi Jamal,

First of all how much physical memory do you have on your system ?

Again you could start with as little as 5% and then check your buffer cache usage (sar -b) and if there is a necessity increase it.

Another thing i noticed is your device swap is configured for almost 8GB (i always read that you never want one big swap device file, rather its better to have equal sized swap devices with the same priority on different disks and preferebly different I/O paths )

-Regards
Ramesh

They think they know but don't. At least I know I don't know - Socrates
System Dude_1
Frequent Advisor

Re: Memory

My system currently having 8GB RAM and 8GB Swap space
Performance Issue on HP-UX 10.20