Free Memory in aix


 
Thread Tools Search this Thread
Operating Systems AIX Free Memory in aix
# 1  
Old 03-05-2008
Free Memory in aix

Hi,

I want to know how to find out free physical memory in aix,
# 2  
Old 03-05-2008
vmstat

Try command vmstat
# 3  
Old 03-06-2008
Quote:
Originally Posted by krishmaths
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.
# 4  
Old 03-06-2008
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
# 5  
Old 03-07-2008
Quote:
Originally Posted by manoj.solaris
[...]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.... Smilie
# 6  
Old 03-07-2008
Quote:
Originally Posted by shockneck
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.... Smilie
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
# 7  
Old 03-07-2008
Quote:
Originally Posted by bakunin
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
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. Smilie '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 Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

High Paging when lots of free memory AIX 5.3

I am new to AIX, I have few AIX 5.3 servers and I could see there are significant difference in paging space utilization on servers even though they are running same applications below server is working fine which shows 2-5 % paging usage throuh out the day cpu_scale_memp = 8... (12 Replies)
Discussion started by: bibish
12 Replies

2. AIX

How much total and free memory I have in my aix 5.3 server?

good morning, how I can know how much total and free memory I have in my AIX 5.3 server, and this is shown in megabytes or gigabytes? Thank you very much. (4 Replies)
Discussion started by: systemoper
4 Replies

3. AIX

How to find AIX Free Memory?

All, AIX: 6.1 64 bits How to find out Free memory available on AIX 6.1 64 bits When I used : svmon -G size inuse free pin virtual mmode memory 1048576 612109 191151 215969 549824 Ded-E pg space 4325376 ... (1 Reply)
Discussion started by: a1_win
1 Replies

4. Programming

Memory free() in C

Hi guys. I've a question, if we are using a syscall that receives a string allocated dynamicaly to a determined size, or NUL and it will allocate the apropriate size. We should free the memory or the OS will do it for us? If a function returns a pointer we should free that poiter when we are done... (7 Replies)
Discussion started by: pharaoh
7 Replies

5. UNIX for Advanced & Expert Users

Out of Memory error when free memory size is large

I was running a program and it stopped and showed "Out of Memory!". at that time, the RAM used by this process is around 4G and the free memory size of the machine is around 30G. Does anybody know what maybe the reason? this program is written with Perl. the OS of the machine is Solaris U8. And I... (1 Reply)
Discussion started by: lilili07
1 Replies

6. Solaris

how to get the more memory free space (see memory free column)

Hi all, Could please let me know how to get the more memory free space (not added the RAM) in local zone. -bash-3.00# vmstat 2 5 kthr memory page disk faults cpu r b w swap free re mf pi po fr de sr s0 s1 s1 s1 in sy cs us sy... (3 Replies)
Discussion started by: murthy76
3 Replies

7. Solaris

How to find Total and Free Physical Memory and Logical Memory in SOLARIS 9

Hi, Im working on Solaris 9 on SPARC-32 bit running on an Ultra-80, and I have to find out the following:- 1. Total Physical Memory in the system(total RAM). 2. Available Physical Memory(i.e. RAM Usage) 3. Total (Logical) Memory in the system 4. Available (Logical) Memory. I know... (4 Replies)
Discussion started by: 0ktalmagik
4 Replies

8. AIX

How to check free/total Memory in AIX

Friends , i have a question how to check the total memomry and free memory in AIX, We have vmstat ,svmon and topas commands.Which command among the will give the true figure. (6 Replies)
Discussion started by: vimalbhan
6 Replies

9. AIX

Free Memory

Hi, how to find free memory in aix? for installing oracle,I have used svmon but not getting proper output (1 Reply)
Discussion started by: manoj.solaris
1 Replies

10. Programming

How to free the memory?

For example if i have the piece of code as follows: CountryName = (char *)malloc((strlen(CountryName)+1)*sizeof(char)); memset(CountryName, 0, strlen(CountryName)+1); CountryName = SOME VALUE Now how do i free the memory after use of this code???? :confused: (3 Replies)
Discussion started by: jazz
3 Replies
Login or Register to Ask a Question