1833758 Members
3017 Online
110063 Solutions
New Discussion

free used memory

 
SOLVED
Go to solution
tecnomatix
Occasional Advisor

free used memory

Does anyone know howto free used memory on hpux 11.0?
this is the output of swapinfo:
panther:/opt/tmp [root] > swapinfo -mta
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 1536 0 1536 0% 0 - 1 /dev/vg00/lvol2
reserve - 315 -315
memory 376 214 162 57%
total 1912 529 1383 28% - 0 -

these are my kernel parameters:
dbc_max_pct 30
dbc_min_pct 5
max_async_ports 50
max_fcp_reqs 512
max_mem_window 0
max_thread_proc 256
maxdsiz 2063835136
maxdsiz_64bit 0X0000000040000000
maxfiles 200
maxfiles_lim 1024
maxqueuetime 0
maxssiz 83570688
maxssiz_64bit 83570688
maxswapchunks 768
maxtsiz 0X40000000
maxtsiz_64bit 0X0000000040000000
maxuprc 75
maxusers 32


there is nothing in the ipcs -ma

Please Help,

Ayelet
Ayelet Regev
6 REPLIES 6
Sridhar Bhaskarla
Honored Contributor
Solution

Re: free used memory

Hi Ayelet,

The memory column that you are seeing in swapinfo is not really the memory used by swap. You have turned swapmem_on kernel parameter. This will enable 75% of memory is to be taken into *calculation* while reserving the swap for the processes. It is not used for swapping. The %used column there can be understood as %memory not available for swap reservation anymore.

To find out the actual memory available, do vmstat and note down the number under 'free' column. Multiply with 4096 to get the free memory in bytes.
It will be much easier if you have glance installed on the box. Just type 'm' in glance window and it will give you a good analysis of how the memory is being used.

Looks like you have 500MB of physical memory. Having 30% for buffer cache may not be a good idea. Unless your application needs that much buffer, you may want to reduce it to 10%. For a 500MB box, 50MB is not bad.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
A. Clay Stephenson
Acclaimed Contributor

Re: free used memory

The answer, in general, to your question is to kill processes. Note that you are doing no swapping at this point. It's very easy to read into the swapinfo output meanings that are not there.

A far better tool is Glance; at the very least, install the 30-day trial version and that will give you a much better idea of how your system is using memory. If you are feeling memory pressure the first thing to consider is reducing dbc_max_pct.
If it ain't broke, I can fix that.
Michael Steele_2
Honored Contributor

Re: free used memory

There is nothing in this report that indicates a problem. Refer to:

total 1912 529 1383 28%

...which is only 28%. Start worrying when this number climbs to 85% and then add some 2ndary swap.
Support Fatherhood - Stop Family Law
Ross Zubritski
Trusted Contributor

Re: free used memory

For HP-UX 11.x systems running on 64 bit architecture:

echo phys_mem_pages/D | adb64 -k /stand/vmunix /dev/mem
phys_mem_pages:
phys_mem_pages: 262144

The results of these commands are in memory pages, multiply by 4096
to obtain the size in bytes.

To determine the amount of lockable memory:

echo total_lockable_mem/D | adb -k /stand/vmunix /dev/mem
total_lockable_mem:
total_lockable_mem: 185280

To determine the number of free swap pages :

echo swapspc_cnt/D | adb -k /stand/vmunix /dev/kmem
swapspc_cnt:
swapspc_cnt: 216447

This will display the number of free swap pages.
Multiply the number returned by 4096 for the number of free swap bytes.

Regards,

RZ
James R. Ferguson
Acclaimed Contributor

Re: free used memory

Hi:

You could consider reducing the size of your buffer cache depending on what you are running. The 'dbc_max_pct' setting specifies the fraction of memory that can be devoted to file system buffers. If you are running a database like Oracle that manages its own buffers, this is wasteful. If you are not experiencing memory pressure (e.g. high page-in activity and/or high cpu activity for 'vhand') however, maintaining more free memory becomes less important.

Regards!

...JRF...
MANOJ SRIVASTAVA
Honored Contributor

Re: free used memory

Hi Ayelet


Also you can use the aatached script to knoe the free memory at any instant in thsi format using the script atttached which I got from the forums .


Memory Stat total used avail %used
physical 4096.0 724.4 3371.6 18%
active virtual 200.1 34.4 165.7 17%
active real 110.3 33.1 77.2 30%
memory swap 3148.6 119.9 3028.6 4%
device swap 1024.0 284.2 739.8 28%



Manoj Srivastava