AIX memory usage by processes


 
Thread Tools Search this Thread
Operating Systems AIX AIX memory usage by processes
# 15  
Old 10-26-2018
-e ought to show every process. If it's not in "RSS", it might be in shared pages, which are notoriously hard to tally since they overlap with no particular owner between processes. Oracle in particular likes to use a lot of share, and manages its own memory internally.
# 16  
Old 10-26-2018
Try ps -e -o size -o args= | sort -k 1,1 which is a very, very rough estimate that likely includes a lot of overlap between processes.
# 17  
Old 10-28-2018
Quote:
Originally Posted by Corona688
Try ps -e -o size -o args= | sort -k 1,1 which is a very, very rough estimate that likely includes a lot of overlap between processes.
I get this...
ps -e -o size -o args= | sort -k 1,1
ps: 0509-048 Flag -o was used with invalid list.
Usage: ps [-AMNZaedfklm] [-n namelist] [-F Format] [-o specifier[=header],...]
[-p proclist][-G|-g grouplist] [-t termlist] [-U|-u userlist] [-c classlist] [ -T pid] [ -L pidlist ]
[-@ [wparname] ]
Usage: ps [aceglnsuvwxX] [t tty] [processnumber]


While i ran the command (Madeingermany proposed)
ps -e -o pid= -o rss= -o vsz= -o args= | sort -k2,2n

and while Server B confuses me, in Server A if you add the RSS(*4/1024) is almost the same as in nmon for processes and system!!
So, it seems the command to give as output the expected result, but not on Server B... Smilie

I Just ran the command on a third similar server and i had the expected results again!!! SmilieSmilie
# 18  
Old 10-28-2018
Quote:
Originally Posted by dim
I get this...
ps -e -o size -o args= | sort -k 1,1
ps: 0509-048 Flag -o was used with invalid list.
Usage: ps [-AMNZaedfklm] [-n namelist] [-F Format] [-o specifier[=header],...]
[-p proclist][-G|-g grouplist] [-t termlist] [-U|-u userlist] [-c classlist] [ -T pid] [ -L pidlist ]
[-@ [wparname] ]
Usage: ps [aceglnsuvwxX] [t tty] [processnumber]
First off: you could have looked it up by searching the forum, for example here, post #6, if you didn't want to read the man page where the various options to ps are also explained. No problem, i will write it down once again:

Code:
ps -Alo pid,vsz,args

"pid" gives the process number, "vsz" the virtual memory used by the process, "args" the commandline used to start the process. Add/rearrange columns for your needs. You will also find some other useful commands to gather information about memory usage in this thread. Especially the output of vmo -a would be interesting.

Your systems are both not swapping (although one uses a very small fraction of the swap) but you can anticipate beginning swap activity even before it happens: issue vmstat -vs and have a look at the number of "revolutions of the clock hand" (or similar - i can't access an AIX system right now). This is the number of times the free memory page scanner has already searched the whole memory for free pages. The faster this number grows the nearer the system gets to the point where actual swapping starts.

And a last tip: when issuing vmstat you should use the -w option always. You will get a neatly formatted table again this way.

I hope this helps.

bakunin
# 19  
Old 10-29-2018
Thanks Bacunin (a phrase I never expected to say :P),

To be honest, i am really tired with this issue.... that's why i didn't even search man page.
I have looked too many threads on this forum, and other forums as well.. but i just don't get it..

i used command you proposed, but this doesn't make any sense... neither ps -Alo, nor vmstat.
vmo -a gets almost the same output on both servers..

Could you please explain to me how you figured out that there is no memory problem?
If it is so, why on Server A the processes are on 35% and on Server B on 70% using 4% pgsp?
# 20  
Old 10-29-2018
Yes, shared memory is often not considered, because it can be used by many process - or it is counted several times.

A special type of shared memory is the SysV IPC (inter process communication), listed with
Code:
ipcs -p

E.g. for the "Shared Memory" the listed PIDs are for the "Creator" and the "Last attacher".

Even the normal fork/exec to create a new process produces shared memory.
Because initially they are identical, they are not actually copied but the new process reuses the memory. They are really copied when the new process modifies it. This is called COW (copy on write).

Last edited by MadeInGermany; 10-29-2018 at 05:48 AM..
# 21  
Old 10-29-2018
Quote:
Originally Posted by MadeInGermany
Yes, shared memory is often not considered, because it can be used by many process - or it is counted several times.

A special type of shared memory is the SysV IPC (inter process communication), listed with
Code:
ipcs -p

E.g. for the "Shared Memory" the listed PIDs are for the "Creator" and the "Last attacher".

Even the normal fork/exec to create a new process produces shared memory.
Because initially they are identical, they are not actually copied but the new process reuses the memory. They are really copied when the new process modifies it. This is called COW (copy on write).
Your last sentence is the explanation of why two identical servers have different usage of memory? To be honest i tried to read man page of ipcs. I can give you the output of those 2 servers... but i still cannot understand it.... Smilie

I am about to give it up.. Smilie

My next shot is to reboot the server which confuses me and check its reaction... Smilie

But i would like to have any "evidence" to approve the need of reboot!
Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Memory usage in AIX server

Hi All, I have some questions regarding the performance, MEMORY/ Virtual Memory (paging /swap space) Please see the nmon-MEMORY stats from my AIX LPAR. 24 GB --> RAM 3456 MB --> Paging Space │ Memory ─────────────────────────────────────────────────────────────────────── │... (8 Replies)
Discussion started by: System Admin 77
8 Replies

2. AIX

Identify All Processes memory and cpu usage.

Hi All, Anyone has script to monitor AIX total processes memory and cpu usage that contribute to the total memory and CPU utilize so far ? The purpose of this is to analyze process memory trend. Thanks. Best Regards, ckwan (2 Replies)
Discussion started by: ckwan
2 Replies

3. AIX

AIX memory usage always high

hi, I want to ask , my AIX 6.1 is always used about 97% memory. Is this normal ? or any command can free up memory like Linux ? thanks. (1 Reply)
Discussion started by: virusxx
1 Replies

4. AIX

AIX 5.3 Physical Memory usage

Hi, I have AIX 5.3TL8 two node cluster using HACMP and have 10g database using RAW devices. I am seeing gradual increase in comp% memory everyday and it reaches 100% and evicts the node, we had 4 evictions in 40days. I am pasting vmstat and vmo output, anyone seen this issue? ... (5 Replies)
Discussion started by: navin7386
5 Replies

5. AIX

How to monitor the IBM AIX server for I/O usage,memory usage,CPU usage,network..?

How to monitor the IBM AIX server for I/O usage, memory usage, CPU usage, network usage, storage usage? (3 Replies)
Discussion started by: laknar
3 Replies

6. AIX

Memory usage on AIX

How to check the memory usage on AIX by various processes? (1 Reply)
Discussion started by: aajmani
1 Replies

7. AIX

estimating memory usage by database processes

Hi Guys, I wonder what would be the best way to determine how much memory is in use on any given time by the database processes. I thought about using ipcs -m command but I wonder if there any better way to determine this. Thanks. Harby. (2 Replies)
Discussion started by: hariza
2 Replies

8. AIX

High memory usage in AIX 5.1

Hi, We have AIX 5.1 machine of RAM 8 GB and paging space is 8GB. we are getting high memory usage of almost 99%.Can anybody please help in this ? Partial vmstat o/p kthr memory ----- ----------- r b avm fre 2 1 278727 1143 There is no paging issue.Becoz in... (5 Replies)
Discussion started by: jayakumarrt
5 Replies

9. AIX

Memory Usage in AIX

Hi All, I have a question, can you guys please help me by giving your valuable suggestons: I am using AIX 5L, running oracle 7 version. I need to increase the oracle memory to 40 MB more. Currently Oracle occupies 260M. I wanted to know whether I can increase the memory without any problem.... (3 Replies)
Discussion started by: kollam68
3 Replies

10. UNIX for Advanced & Expert Users

Memory Usage in AIX

Hi All, I have a question, can you guys please help me by giving your valuable suggestons: I am using AIX 5L, running oracle 7 version. I need to increase the oracle memory to 40 MB more. Currently Oracle occupies 260M. I wanted to know whether I can increase the memory without any problem.... (1 Reply)
Discussion started by: kollam68
1 Replies
Login or Register to Ask a Question