FW: Total memory usage by all processes

From: Muqthar Ahmed (Muqthar.Ahmed@DECORATETODAY.COM)
Date: Wed Jul 31 2002 - 12:07:00 EDT


Thanks to Bill Verzal, Jean-Marc Monnez and Frank Muller for your valuable input.

Muqthar Ahmed

-----Original Message-----
From: Jean-Marc Monnez [mailto:monnez.jean-marc@AGORA.MSA.FR]
Sent: Wednesday, July 31, 2002 5:17 AM
To: aix-l@Princeton.EDU
Subject: Re: Total memory usage by all processes

Real memory usage by an application is always very hard to estimate. I'd like to suggest the best mean I found for
this estimation in 4.3.3.
When you sum up the ps results for several processes, you can't separate the private and the shared segments. ps
results take all of them in account to estimate the RSS for every process.
Great problem with shared segments to estimate an app memory this way, because you count them multiple times in
your resulting figure, including even the kernel segments (libc ...) that all processes use. They are shared which
means they appear only once in memory, but you count them multiple times.
I have seen products allowing (2 years ago I can't remember the product names) to calculate these memory
consumptions based on a process name, but they all used the sum up of ps results. I proved with a svmon command
that the estimation error was dramatically growing with the number of concerned processes, but the svmon result
was very tedious to use in 4.3.2. In our case, the error could reach more than 500% for just 3 Informix instances.

Now with 4.3.3, you have a new svmon option (-C cmd) that allows you to get a sum up at the beginning, and the
shared segments are counted only once !!! Good, and you just have to deduct the kernel segment (which is always in
memory whatever app you may run) to get a good estimation of your real memory usage due to the app.

So I suggest you use something like :
svmon -C proc_name -d
and have a look at svmon manual.

Regards

-- JMM

Bill Verzal wrote :

> I usually do:
>
> ps auxwww
>
> and then sum up the "RSS" column. Multiply the result by 4096.
>
> RSS is "Real Segment Size" and is in 4096 byte segments.
>
> -----------------------------------------------------------------------------------------------------------
>
> Bill Verzal
> Technical Consultant
> Forbes Technical Consulting
> (312) 653-3684
> bill_verzal@bcbsil.com
> MailStop: 27.201C
>
> |--------+--------------------------------->
> | | Muqthar Ahmed |
> | | <Muqthar.Ahmed@DECORATE|
> | | TODAY.COM> |
> | | Sent by: IBM AIX |
> | | Discussion List |
> | | <aix-l@Princeton.EDU> |
> | | |
> | | |
> | | 07/30/2002 11:25 AM |
> | | Please respond to IBM |
> | | AIX Discussion List |
> | | |
> |--------+--------------------------------->
> >----------------------------------------------------------------------------------------------------------|
> | |
> | To: aix-l@Princeton.EDU |
> | cc: |
> | Subject: Total memory usage by all processes |
> >----------------------------------------------------------------------------------------------------------|
>
> Hi,
>
> I have coulple of Oracle databases running on IBM UNIX server. I could
> calculate the total memory used by Oracle processes by running Oracle
> scripts. Does anyone know how to get the TOTAL MEMORY USAGE for ORACLE and
> NON-ORACLE processes???
>
> Thanks in advance!
>
> Muqthar Ahmed
> Database Administrator



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:06 EDT