Operating System - HP-UX
1748176 Members
4211 Online
108758 Solutions
New Discussion юеВ

Re: Memory utilization confusion.

 
SOLVED
Go to solution
gdemers
Advisor

Memory utilization confusion.

We had a Java process fail due to memory constraint and saw the following swapinfo:

TYPE AVAIL USED FREE USED LIMIT RESERVE PRI FILE NAME
dev 4194304 2785150 1409154 66.40% 0 - 1 64 (major)
reserve - 1408402 -1408402
memory 1042614 1039458 3156 99.70%

Does this mean 99.7% of RAM is in use? Is this non-pageable allocation? If not I'd wonder why the system didn't just reduce the footprints of enough processes to accomodate another.
8 REPLIES 8
James R. Ferguson
Acclaimed Contributor

Re: Memory utilization confusion.

HI:

You are out of memory. You have 66% of your device swap utilized and all of real memory. I would look at your page-outs in 'vmstat'. Anything in double-digits or above means that you system is doing excessive paging and is further degraded.

Regards!

...JRF...
gdemers
Advisor

Re: Memory utilization confusion.

So is this message:

vmunix: Deferred swap reservation failure pid:

Does the calculation count disk swap space along with memory? If so that means I could add more disk swap space and avoid this--not bad performance however-- in the future?

Are the in-use numbers swap-info return not including the amount "reserved" by lazy swap reservation?
Bill Hassell
Honored Contributor

Re: Memory utilization confusion.

You have a very small system (1GB) so you'll need to ad a lot more swap, perhaps another 2-10GB. Create a new lvol, then use swapon to add this to your swap space and you should be OK. Note that 2-10GB is just a guess. JavaJunk can use gigabytes on the code.

Now that said, performance will so bad that you may not be able to login or run commands for several minutes. If your Java code needs 4GB of space, virtually all processes will be swapped out and the Java code will thrash back and forth virtually freezing all other activity.

So this machine is badly undersized for the applications. I would start by finding out what the maximums will be when the machine is in production. If everything adds up to 4GB, add 5GB to your machine and performance should be acceptable...assuming that your application will have enough CPU to run parallel processes and threads.


Bill Hassell, sysadmin
Pramod Kumar M
Advisor

Re: Memory utilization confusion.

Looks like you are out of memory. Consumption memory depends on the memory requirements of your application. Yes, opearating system tries manage it by swapping. But during this generally your system performance will be very slow. Your applications may be making gradual progress which you may not even notice.

Looks like you need more RAM.

-Pramod.
Dennis Handly
Acclaimed Contributor
Solution

Re: Memory utilization confusion.

Please provide "swapinfo -tam" output.
If memory is full, it is likely total swap is too.

>wonder why the system didn't just reduce the footprints of enough processes to accommodate another.

That's what you do for memory but not swap. (You can't swap swap. :-) Where is it going to put it? You are out of swap.

>vmunix: Deferred swap reservation failure pid:
>Does the calculation count disk swap space along with memory?

All swap requests count total swap. (That -t" above.)

>that means I could add more disk swap space and avoid this in the future?

Exactly.

>Are the in-use numbers swap-info return not including the amount "reserved" by lazy swap reservation?

Right. By using lazy swap you are cheating and on your own.
gdemers
Advisor

Re: Memory utilization confusion.

# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 16384 9574 6810 58% 0 - 1 /dev/vg00/lvol2
reserve - 6069 -6069
memory 4073 1792 2281 44%
total 20457 17435 3022 85% - 0 -
#

So I'm thinking we should add another swap device and watch paging rates? Can this be done effectively with SAR or would you recommend vmstat?
Bill Hassell
Honored Contributor

Re: Memory utilization confusion.

Monitor paging with vmstat. Look at the "po" column. As a general rule, po=0-9 is OK, po=10-30 means the system is being slowed somewhat, po=40-90 means that everyone is noticing a slow system, and po over 100 means very long delays. Note that when pages are deactivated and moved to swap, memory is rearranged and this requires all CPUs in the system to wait for memory changes to complete. So it's not just disk I/O, it's CPU cycles that are wasted while everyone waits for memory to be rearranged.


Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: Memory utilization confusion.

>total 20457 17435 3022 85%

Unfortunately your system wasn't as busy when you got this. And from the "dev" and memory differences, are you even on the same system?