Operating System - HP-UX
1835766 Members
2883 Online
110085 Solutions
New Discussion

Re: Determining where my memory went

 
David Child_1
Honored Contributor

Determining where my memory went

You can take that subject line in a number of ways and it would be accurate, but in this case I am trying to determine how I can show in actual data where my servers memory is being used.


Problem: RP7400 running 11.00 with 11 x Sybase 11.9.3 databases is using 100% of its 12GB of memory (and paging). The DBAs look into their tables and say they are only using ~6GB of space and want to know where the rest of the 12GB is going.


I have run a 'ps -eo vsz,pid,ppid,user,comm' and come up with ~800Mb. I have run ipcs -moab and come up with ~6GB. Glance shows:


Sys Mem = 555.3Mb
Buf Cache = 368Mb
User Mem = 11.1Gb
Free Mem = 44.0Mb
Total VM = 494.2Mb
Active VM = 330.0MB


Where else might I look for this 'missing' memory? I used 'lsof' and it showed quite a bit of space in the 'SIZE' column for VREG files, but I'm not sure if this relates entirely. An example line from my 'lsof' output file is:


COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
-----------------------------------------------
dataserve 12560 sybase 89uW VREG 64,0x190001 33554432000 4 /temparchive1 (/dev/vgtemparch/lvtemparch1)


Thanks,
David
5 REPLIES 5
Sundar_7
Honored Contributor

Re: Determining where my memory went

Hi David,

With ps & ipcs u could only display the shared memory and it doesnt give u any inputs on memory mapped files & shared library.

Use the attached procsize.sh. procsize can display the memory mapped files , shared libary and account the shared memory regions only once for any number of processes using it.

-- Sundar.
Learn What to do ,How to do and more importantly When to do ?
Ken Hubnik_2
Honored Contributor

Re: Determining where my memory went

Try this command. It will sort the output by largest memory usage and the second column gives you the process ID>

UNIX95= ps -e -o vsz=Kbytes -o pid,args=Command-Line | sort -rnk1

David Child_1
Honored Contributor

Re: Determining where my memory went

Sundara,

Thanks for the utility. I assume output sizes are in Kb. Using that tool I was able to account for ~8.13Gb of the memory (output attached). That is still ~3GB short of the 11GB user memory that Glance shows.

Ken,

If you notice in my original post, I had already used the 'ps -e -o vsz...".

Thanks,
David
David Child_1
Honored Contributor

Re: Determining where my memory went

Sorry, forgot the attachment.
Sundar_7
Honored Contributor

Re: Determining where my memory went

David,

Sorry I should have mentioned, you must display RSS using the procsize utility and not the VSS.By default the procsize displays VSS.

go through the attached doc. should make the things clear.

Thanks,

Sundar.
Learn What to do ,How to do and more importantly When to do ?