Operating System - HP-UX
1827771 Members
2597 Online
109969 Solutions
New Discussion

Re: Memory usage questions

 
Markus Bonet
Advisor

Memory usage questions

Hello,

I have difficulties with our system, an RP-7420. It is equipped physically with 8 GB RAM.
The system is used as a tape-backup server.
As soon as some I/O is handled, the memory usage is getting too high, so the system uses disc-space for further memory requests.
I take this information from swapinfo. Memory is at 100%, and disc devices are used.
At this point, I/O-handling is getting very slow so the backups won't finish within time.

If I check memory usage with top or ps, the overall amount isn't very high.

So, how can I check, where all the memory has gone?


Kind regards
Markus
5 REPLIES 5
harry d brown jr
Honored Contributor

Re: Memory usage questions


glance

see: http://managementsoftware.hp.com/products/gplus/download.html

live free or die
harry d brown jr
Live Free or Die
Steven E. Protter
Exalted Contributor

Re: Memory usage questions

I'm attaching a free sar script set for performance data collection that hp wrote, and I fixed and upgraded.

This set may be of assistance, though glance is a better tool for looking at memory and thread allocation.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Markus Bonet
Advisor

Re: Memory usage questions

OK,

thanks for your hints but I am still stuck to this problem.

I can see that 95-100% of the physical memory is used but I can't see which processes are holding the memory.

Isn't it possible to show the memory-usage of each process? The sum within top or ps only shows up about 1 GB RAM.

So where is the rest?


Kind regards
Markus
Ermin Borovac
Honored Contributor

Re: Memory usage questions

Sort processes by virtual memory usage and check entries towards the bottom of the list.

$ UNIX95= ps -eo vsz,user,pid,args | sort -n

Check shared memory usage (look at SEGSZ)

$ ipcs -mob | sort -n -k8

Are there any shared memory entries that stand out with high usage?
Geoff Wild
Honored Contributor

Re: Memory usage questions

Also check your kernel parameter MAX_DBC_PCT

For 8 gb, I would set to either 8 or 9 or 10...

That will free up some meory for the backup application.

Here's a handy script:

# cat processmem
#!/bin/sh
# processmem - display memory claimed by a process
# gwild 03192004
#
if [ $# -lt 1 -o \( $# -gt 1 -a $# -lt 4 \) ]
then
echo "Usage:"
echo "processmem \"process\""
echo "Example:"
echo "processmem rpc"
exit 1
fi
echo " "

PROCESS=$1

mps=0
#for sz in `ps -elf | grep $PROCESS | grep -v grep | awk '{print $10}'`
for sz in `UNIX95= ps -e -o vsz=Kbytes -o ruser -o pid,args=Command-Line | sort -rnk1 | grep -v Kbytes | grep $PROCESS | awk '{print $1}'`
do
mps=`expr $mps + $sz`
done
#echo `expr $mps \* 4096`
echo "\nMemory claimed by $PROCESS: $mps Kbytes.\n"

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.