Operating System - HP-UX
1836355 Members
2007 Online
110100 Solutions
New Discussion

memory leak , where is swap being used

 
Dale Corrington
Advisor

memory leak , where is swap being used

Since reinstalling to go from 10.2 to 11.0 I have had swap problems. The worst is after several days all of swap is reserved even with no applications running. Rebooting cleans it up. Also I have a large amount of memory "pseudo-swap" used even though device swap is free. Below is 1 day after boot, no
applications running. This is a C200.
I have installed all March 01 GR patches.
On 10.2 I would go 3 months with reboot, now
I can't go 1 week.
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 768 53 715 7% 0
reserve - 173 -173
memory 269 241 28 90%
total 1037 467 570 45% -

Thanks,
Dale Corrington
Eagle Mold

6 REPLIES 6
Vincenzo Restuccia
Honored Contributor

Re: memory leak , where is swap being used

The system reserves a part of swap however, therefore e' useless to make reboot.Se you have problems of performances you add one swap secondary with SAM.
Brian Hackley
Honored Contributor

Re: memory leak , where is swap being used

Dale,

If you suspecting a memory leak, log a software support call and see if they'll send a tool to trace where memory is being allocated. I've used some unsupported tools such as keminfo and vmtrace for this.

Regards,

-> Brian Hackley
Ask me about telecommuting!
Jeff Laux
Occasional Advisor

Re: memory leak , where is swap being used

Dale,

We ran into something similar when we moved from K boxes on 10.20 to N boxes on 11.00. The HP support center recommended changing the following two kernel parameters:

dbc_min_pct
dbc_max_pct

From my understanding, these parameters determine how much memory is allocated for the kernel's use. Even though the kernel requires a minimal amount of memory, if these parameters are set high, then the kernel will eventually grab more of the memory. We saw the same performance degradation over time that you're probably seeing too. After we changed the values to 2 for dbc_min_pct and 5 for dbc_max_pct, our swap and memory issues went away.

I'm not sure if this is the exact same issue you're having, but hopefully it helps.

Jeff Laux
Precision Strip, Inc.
Tim Medford
Valued Contributor

Re: memory leak , where is swap being used

Dale - There is also a known memory leak with some of the OV emanate system agents on 11.0.

Specifically look at mib2agt (using glance perhaps) It should be using around 800k of memory, but on our system is was consuming 490m. Applying patch PHSS_21046 fixed the problem for us.

Regards,
Tim
Mladen Despic
Honored Contributor

Re: memory leak , where is swap being used

Dale,

The symptoms that you describe seem like a more
severe version of the symptoms that I have seen on
one of our database servers (Sybase).

Although I am still trying to get more information from
HP, here is a summary of what I have learnt so far:

1. Any processes using locked memory may compete
with "pseudo-swap reservations" . (You can run
'swapinfo -tam' and look for 'memory' line to see
your current pseudo-swap reservations.) In
particular, Sybase and Oracle recommend disabling
pseudo-swap on HP-UX systems running their
database engines. NOTE: If you disable
pseudo-swap, you may have to create additional
swap space on disk.

2. Modify the kernel parameter dbc_max_pct so that
your buffer cache is not "too large". The value
of this kernel parameter specifies the maximum
PERCENTAGE of the physical memory that can be
used for buffer cache. You probably do not want
your buffer cache larger than 200-300 Mb.

3. If there is a memory leak, I use GlancePak to isolate
the "leaking process". Some of the reported
Glance/Measureware metrics are incorrect due to
HP-UX kernel bug(s), but even when the process
metrics PROC_MEM_RES and/or PROC_MEM_VIRT
are incorrect, they usually show a gradual increase
over time when there is a memory leak. I also
like to use "application metrics" because I can
usually isolate the problem more quickly. If you use
Glance and/or Measureware, and you would like more
details on this, let me know: mdespic@ugg.com

4. All of the above have helped us manage memory
utilization. The system itself is a lot more stable.
However, I can still observe a slight increase in
the metrics: GBL_SWAP_SPACE_UTIL,
GBL_MEM_UTIL, and GBL_MEM_USER_UTIL,
whereas the sum total of APP_MEM_UTIL for
all of the configured applications does not show
this increase. Is this another bug with HP-UX
kernel? I don't know, but HP has confirmed
the earlier mentioned kernel bug should be
corrected under HP-UX 11i

If anyone has further info on these issues, I would
certainly like to hear about it: mdespic@ugg.com

Thanks,

Mladen



Mladen Despic
Honored Contributor

Re: memory leak , where is swap being used

Dale, another note: If I recall correctly, the
pseudo-swap is turned on by default under HP-UX
11.00, but not under HP-UX 10.20. Since you have
upgraded from 10.20 to 11.0, this may be a clue.

Mladen