AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
#Power
 View Only
Expand all | Collapse all

memory usage of process

  • 1.  memory usage of process

    Posted Sun July 04, 2010 06:06 PM

    Originally posted by: Balaji-OHIO


    Hi,
    How to determine the memory usage of a Oracle process in Aix machines. for e.g. I have shown a command o/p of ps aux and ps v of a Oracle back ground process.

    > ps aux

    USER PID %CPU %MEM SZ RSS TTY STAT STIME TIME COMMAND
    oracle 19861688 0.8 0.0 162600 231468 - A 18:01:25 1:37 oraclerisk (DE

    > ps v 19861688
    PID TTY STAT TIME PGIN SIZE RSS LIM TSIZ TRS %CPU %MEM COMMAND
    19861688 - A 2:35 0 32968 239360 xx 137527 206392 0.8 0.0 oracle

    -Bala
    #AIX-Forum


  • 2.  Re: memory usage of process

    Posted Mon July 05, 2010 10:00 AM

    Originally posted by: j.gann


    man svmon

    -P option especially. consider that memory segments can be shared (kernel segment and oracle SGA especially). svmon will report these for each process while its present in memory only once.

    jg
    #AIX-Forum


  • 3.  Re: memory usage of process

    Posted Tue July 06, 2010 09:41 AM

    Originally posted by: Balaji-OHIO


    Hi,
    I don' have access to svmon, Iam not SA. Can anyone please provide answer for my question.

    -Balaji
    #AIX-Forum


  • 4.  Re: memory usage of process

    Posted Tue July 06, 2010 02:52 PM

    Originally posted by: nagger


    The quesion you ask has no simple answer.

    The RSS column is the residense set size which is the memory of the program which is in memory at the moment.

    But this will include many pages which are shared with other processes.

    svmon gives you the full picture but to be frank its a very complcated picture and hard to understand because the memory of all process is complicated. There is read only memory for program code, private memory that is shared with child processes until the parent or child modifies its copy, the is shared memory between processes like your Oracle SGA and then there is probably a dozen libraries with shared code, and shared or private pages. And then there is memory mapped files and then ....

    thansk Nigel
    #AIX-Forum


  • 5.  Re: memory usage of process

    Posted Tue July 06, 2010 03:47 PM

    Originally posted by: Balaji-OHIO


    If RSS is the memory size of a process (in this case 231468), it means it is consuming 231 MB from OS memory. So which kernel parameter controls this RSS value. Iam seeing the RSS value differs for non-Oracle id and Oracle id as shown below. Like all Oracle process consuming around 231450 nearly (in mega bytes), and all non-oracle process consuming around 235 (very smaller values).

    oracle 15612388 0.0 0.0 144560 213428 - A 14:52:54 0:00 oraclepodb (LO
    regnid 15634562 0.0 0.0 704 380 - A 04:01:08 0:00 /bin/ksh /home

    -Balaji
    #AIX-Forum


  • 6.  Re: memory usage of process

    Posted Thu July 08, 2010 02:12 PM

    Originally posted by: j.gann


    it would be helpful if you told us what you want to do with the information. what's the problem?
    #AIX-Forum


  • 7.  Re: memory usage of process

    Posted Wed July 14, 2010 05:33 PM

    Originally posted by: Balaji-OHIO


    I need to check the individual memory usage in Aix server. I tried with svmon, nmon, topas. No command is showing the individual process memory usage. And some documents say Aix manages memory very differently i.e. it uses all the available memory and we cannot see the actual usage of memory. I want to know how much free memory left in the system. svmon, nmon commands always shows 98% or 99%, even without any process running in the server.
    #AIX-Forum


  • 8.  Re: memory usage of process

    Posted Thu July 15, 2010 05:56 AM

    Originally posted by: Kosala


    There are many people here will disagree to this approach, even I understand this is not 100% accurate but one way would be...

    1. ps -eko rssize,vsz | awk '{rss+=$1; vsz+=$2;} END {print rss" "vsz }'

    this will give you the total resident memory and virtual memory for all the processes. I mostly depend on this. I don't think this way it captures the memory utilized by share library calls, so it's not accurate.

    Kosala
    #AIX-Forum


  • 9.  Re: memory usage of process

    Posted Thu July 15, 2010 06:28 AM

    Originally posted by: j.gann


    > I need to check the individual memory usage in Aix server
    svmon -P

    > I want to know how much free memory left in the system.
    vmstat -v| grep "free pages"

    besides: unix is complex. if you have not encountered shared memory or dynamic file system cacheing read these up. no command output will do any good without your understanding.
    #AIX-Forum


  • 10.  Re: memory usage of process

    Posted Thu July 15, 2010 11:04 AM

    Originally posted by: Balaji-OHIO


    If I run vmstat, it is showing 313 MB free, actually the server memory capacity is 184 GB. And it is always showing only few MB available free when I run nmon or vmstat command. I checked in all Aix servers we have, all the servers o/p's in same way. I don't believe these values generated from nmon and vmstat comamnds, there should be some formulae to find the free memory in Aix server.
    #AIX-Forum


  • 11.  Re: memory usage of process

    Posted Thu July 15, 2010 01:51 PM

    Originally posted by: shargus


    That's probably correct. AIX will try to use the free memory for buffer cache.

    Take a look at vmstat -v.
    The first line, memory pages, is the number of 4k pages total in your system.
    The next line, lruable pages, is the pages that lrud can manage.
    "pinned pages" is the pages that are "pinned", or locked into memory.
    "file pages" is the size of the file buffer cache.

    The file buffer cache will grow and shrink as required. If your processes require more memory, the cache will shrink to accomodate.

    The maxperm% parameter will tell what percentage of free memory to allocate for file buffer cache. At AIX6.1, this value defaults to 90%.

    Nmon does a much better job of illustrating this. Under the memory screen ("m"), the section on the right shows "FileSystemCache(numperm)" is the percentage of memory for the cache, "Process" is the percentage used by your processes, "System" is memory used by the kernel, and "Free" is free memory. The "Total" should add up to 100%. If you watch it, you may see "Process" go up and "FileSystemCache" go down as the cache adjusts for the process requirements.
    #AIX-Forum


  • 12.  Re: memory usage of process

    Posted Thu July 08, 2010 04:08 AM

    Originally posted by: Renaud


    May be you could you WLM in passive mode,to see the memory used by oracle ?
    #AIX-Forum


  • 13.  Re: memory usage of process

    Posted Sun July 18, 2010 03:31 PM

    Originally posted by: niella


    Hi,

    Here are a few pointers:

    1. The private process memory can be calculated by doing 'ps vg' (RSS - TRS). This gives an indication of memory that is not shared at all.
    2. The shared memory can be viewed through 'svmon -P PID'.
    3. In terms of overall memory usage, look at the virtual column of 'svmon -G'. Once this approaches the server's physical memory, the server will begin to page to paging space.

    Niel
    #AIX-Forum