Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Monitoring memory

Status
Not open for further replies.

dklloyd

MIS
Mar 9, 2001
78
0
0
GB
Hi
We've been monitoring our 3Gb of memory using svmon -G every 1/2 hour. Generally it shows very little free memory all day & night (3Mb at the most), which is okay cos we can't put any more in the box! If I total the memory for all processes using 'ps aux' the total comes out at around 2Gb. Also at night we close down the middle tier d/base s/w which runs on the same box as the database. svmon still appears to show no change in memory usage as the inuse figure stays pretty much the same.
If we boot the box then memory shows loads free but it gradually increases again until it is back to 3Gb.
On a Tuesday morning (01:00) something seems to run to free about 500Mb that svmon does show as such but this gets taken but processes within a couple of hours.

My questions are therefore...
Do processes prefer to take free memory rather than initialise or purge memory from terminated processes, hence eventually all memory looks as though it is being used once the free memory has been allocated?
Why is there a difference between the total of process memory (2Gb) and the inuse memory from svmon (almost 3Gb).
How can I best report the memory truely in use by processes other than totalling up the ps aux list?

Thanks in advance for you comments

dklloyd

 

Hi,
All memory not in use by processes are being used for buffers and cache. That's why it increases gradually after rebooting.

If you run a large process it will free some buffers to use and after the process shuts down it will appear to free up memory.

Unix is sufficiantly efficiant in it's memory allocation method to not worry about it.

If you type 'svmon', the last row 'in use' under 'working' will show you how much memory is use by processes.

Cheers

Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
Thanks Henrick
I wonder whether you can help me out on interpreting the results...
I've looked at the output from svmon and I have noticed the following from it.

The In use - pers(istent) in svmon equals 1985Mb.
The In use - working in svmon equals 1086Mb.
The total of the ps aux SZ column = 3,352Mb
The total of the ps aux RSS column adds up to 1903Mb

Can you tell me which of these I can say is the amount of real memory being used and what the various figures tell me?

Can I find out similar about the paging space?

The rest of the svmon is as follows:
size inuse free pin virtual
memory 784373 783869 504 24859 308308
pg space 524288 155781

Thanks again.. your help is much appreciated

David Lloyd
 

> The In use - pers(istent) in svmon equals 1985Mb.
> The In use - working in svmon equals 1086Mb.
> The total of the ps aux SZ column = 3,352Mb
> The total of the ps aux RSS column adds up to 1903Mb

Persistent means that the page has backing storage on disk: It's a cached page on a file system.

Working would be pages use for process' text and data segments. This is the one you're after.

The SZ colomn is the absolute size of the process. This doesn't take in account shared shared segments and paged out pages. This column will add up to more than is actuall used (P.S. I'm not a 100% on this, that's what I believe it is)

The RSS (Resident Stack Segment?) I belive is the working pages actually in memory, but I'm not sure. This again would count shared segments multiple times which is why it is so high.

I would like someone to confirm this??

I don't think you can find this for paging space. Paging space only has working segment pages though.

Cheers



Henrik Morsing
Certified AIX 4.3 Systems Administration
& p690 Technical Support
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top