Operating System - HP-UX
1832822 Members
3346 Online
110045 Solutions
New Discussion

memory leakages on the server

 
T G Manikandan
Honored Contributor

memory leakages on the server

Hello,
I am running some 32-bit applications on the machine.The memory usage seems to be the same even after stopping all the running applications on the server.How can I find the application memory leakages.Only rebooting the server clears everything!

I have some questions!
1.If I am presenting some reports for the performance of the server,What are the details I should be concentrating with?
I have some servers with Tuxedo,Oracle and some banking software on it.There are a lot of compilations on the hp server.The compilations use more memory and the server has a memory crunch.
I have 2GB of memory on the machine.What all kernel parameters I should be looking at?
I really can find that there are shortage of resources.How can I project this?
What all parameters can I tune like.
Each compilation or a build takes around 15hrs in average.

Please, your suggestions and advice.

Thanks
3 REPLIES 3
Steve Steel
Honored Contributor

Re: memory leakages on the server

Hi


Run this a few times and if any VSZ values change loot at the process

#!/usr/bin/ksh
#
# Show processes sorted by size of core image
#
# Usage:
# psram [ quantity ]
#
# where quantity is the top RAM processes to show (default is 20)
#
set -u
if [ $# -gt 0 ]
then
TOPPROCS=$1
else
TOPPROCS=20
fi

MYNAME=$(basename $0)
TEMPFILE=/var/tmp/$MYNAME.$$
trap `rm -f $TEMPFILE > /dev/null 2>&1` 0 1 2 3 15

UNIX95= ps -e -o ruser,vsz,pid,args > $TEMPFILE
head -1 $TEMPFILE
DASH5="-----"
DASH25="$DASH5$DASH5$DASH5$DASH5$DASH5"
echo "$DASH5---- $DASH5- $DASH5 $DASH25$DASH25"
grep -v "VSZ COMMAND" $TEMPFILE | cut -c -78 | sort -rn -k2 | head -${TOPPROCS}
rm $TEMPFILE > /dev/null 2>&1



Also look at /usr/share/doc

command kmtune -l

pg /usr/sam/lib/kc/params.tx


sam has a complete parameter list.

look for
swap (swapinfo -ta)
maxdsiz
maxssiz

Errors in syslog.log


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Giri Sekar.
Trusted Contributor

Re: memory leakages on the server

Hi

For memory leaks..Acouple of suggestions.
1. run a debugger
2. Alternatively you can run glance and look at Process information to look into the virtual stack size(VSS) Find out if this Value keeps increasing for that particular process.

As Far as the Kernel Parameters goes find out your dbc_max_pct value. Since you said you had 2gb, it is recommended to have dbc_max_pct to be around 15-20%. Also do a sar -b and look into the wcache(desiarable >70) and rcache(desiarable >90) values. These would be the first place to start.
"USL" Unix as Second Language
Sandip Ghosh
Honored Contributor

Re: memory leakages on the server

Please provide some details abt ur env.
sar -b 2 10
sar -q 2 10
swapinfo -tm
kmtune -l
sar -v 2 5
Configuration of the system.

Look through glance. See what types of alarm you are getting. Look at the file table performance also, whether they are having any shortage or not?

But before doing all of those check your dbc_max_pct as mentioned by Giri. Bring it down to 15% and then post the above ouput taken during the pek hour of the system.

Sandip
Good Luck!!!