The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > AIX
Google UNIX.COM


AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to find Total and Free Physical Memory and Logical Memory in SOLARIS 9 0ktalmagik Filesystems, Disks and Memory 2 07-21-2008 04:38 AM
Free Memory manoj.solaris AIX 1 10-12-2007 08:48 AM
How to free the memory? jazz High Level Programming 3 11-03-2005 12:45 PM
How do I find out how much swap and memory is free? expos UNIX for Dummies Questions & Answers 2 12-30-2003 07:58 AM
memory free up using 'find' shibz UNIX for Advanced & Expert Users 6 11-03-2002 01:01 PM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 03-04-2008
Registered User
 

Join Date: May 2007
Posts: 64
Free Memory in aix

Hi,

I want to know how to find out free physical memory in aix,
Reply With Quote
Forum Sponsor
  #2  
Old 03-04-2008
Registered User
 

Join Date: Sep 2006
Location: Mysore, India
Posts: 160
vmstat

Try command vmstat
Reply With Quote
  #3  
Old 03-06-2008
Registered User
 

Join Date: May 2007
Posts: 64
Quote:
Originally Posted by krishmaths View Post
Try command vmstat
Hi Krishmaths,

Thanks for quick reply, But my requirement is just like in linux and solaris "top" command is there which will display your physical free and used memory and in aix topas command is there but it does'nt show free and used physical memory.
Reply With Quote
  #4  
Old 03-06-2008
Bughunter Extraordinaire
 

Join Date: May 2005
Location: In the leftmost byte of /dev/kmem
Posts: 1,262
Use "vmstat" and look at the column "fre" in the output. That is the amount of free main memory measured in 4K-pages. You could have found that out by reading the man-page of "vmstat" before disregarding it as unusable for your purpose.

If you want to see a list of processes and how much memory each of them uses try "ps -Alo vsz,pid". The column "vsz" is the amount of memory used. For an in-depth discussion about which other options there are read the man-page of "ps".

bakunin
Reply With Quote
  #5  
Old 03-07-2008
Registered User
 

Join Date: Mar 2008
Location: Infractor's boudoir
Posts: 203
Quote:
Originally Posted by manoj.solaris View Post
[...]I want to know how to find out free physical memory in aix,
define "free" ... AIX uses as much memory as it can and so there is only little "unused" memory. E.g. if there is some memory that is not used for program cache AIX uses the rest for file cache. Hence you end up with as little "free" memory as vmstat's "free" column gives. That does not necessarily imply that there is no memory left....
Reply With Quote
  #6  
Old 03-07-2008
Bughunter Extraordinaire
 

Join Date: May 2005
Location: In the leftmost byte of /dev/kmem
Posts: 1,262
Quote:
Originally Posted by shockneck View Post
define "free" ... AIX uses as much memory as it can and so there is only little "unused" memory. E.g. if there is some memory that is not used for program cache AIX uses the rest for file cache. Hence you end up with as little "free" memory as vmstat's "free" column gives. That does not necessarily imply that there is no memory left....
This is why i have offered "ps" as a means to find out how much memory is in fact used by processs. Add to this number the shared memory segments and you get a number you can compare to the "fre" column in vmstat. This is the best approximation to whatever you might define as "free". In my wording "free" means "unused" and vice versa, not "maybe freeable by arbitrarily complex procedures". The AIX kernel tries to use memory as efficient as possible and might show relatively little memory as free when it could do with significantly less memory too - that doesn't mean that the number is incorrect, but that maybe processes stay in memory which would otherwise have been swapped out or all sorts of buffers being full-length whereas they would be decreased in size in case of memory shortage.

All this is called "memory management" and is one of the main things a kernel has to do - and as efficiently as possible so. Still, despite all the clever mechanisms IBM might have built into the kernel, for less memory you pay a price and you pay it with performance: the one process might get swapped out but at some point in time you have to swap it in again and then the machine will have to wait for some time. Some buffer size might decrease, but this will - however slightly - affect the hit ratio and certainly not in a positive way.

Bottom line: regardless of how clever you define "free" at last it comes down to "sufficient or not". This is why every performance optimization projects should start with an SLA to agree upon. The user and the SysAdmin have to agree upon how fast exactly is "fast enough". Until then discussions about how free "free" means are pointless.

bakunin
Reply With Quote
  #7  
Old 03-07-2008
Registered User
 

Join Date: Mar 2008
Location: Infractor's boudoir
Posts: 203
Quote:
Originally Posted by bakunin View Post
This is why i have offered "ps" as a means to find out how much memory is in fact used by processs. Add to this number the shared memory segments and you get a number you can compare to the "fre" column in vmstat. This is the best approximation to whatever you might define as "free".
Using "ps" may be a valid means. IMHO svmon (-G) is somewhat better up to this job (how much memory is free) as it keeps away from me some overly complex procedure of summing up every process's memory size to find out how much memory overall is needed. Furthermore there is no need to consider that memory segments can be used by multiple processes when you use svmon. Subtract the (active) "virtual" memory from the "size" and you get a good impression on how much memory is "free"

Quote:
Originally Posted by bakunin View Post
In my wording "free" means "unused" and vice versa, not "maybe freeable by arbitrarily complex procedures". The AIX kernel tries to use memory as efficient as possible and might show relatively little memory as free when it could do with significantly less memory too - that doesn't mean that the number is incorrect, but that maybe processes stay in memory which would otherwise have been swapped out or all sorts of buffers being full-length whereas they would be decreased in size in case of memory shortage.
I agree with the kernel thing - but in case there might have been some misunderstanding: I wasn't up to learn what you, bakunin, understand by "free" memory. I was rather keen to find out what the OP wanted to know in the first place. 'Cause I thought this thread was about some AIX specific memory handling which might be confusing for a beginner as there *seems* to be almost no free memory
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
linux, solaris

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 06:30 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0