Top and Prstat display different results for memory


 
Thread Tools Search this Thread
Operating Systems Solaris Top and Prstat display different results for memory
# 1  
Old 12-28-2006
Top and Prstat display different results for memory

I have a question about the accuracy of prstat.

I did a 'prstat -t' and it shows 99% of my memory is occupied by oracle.

NPROC USERNAME SIZE RSS MEMORY TIME CPU
194 oracle 343G 340G 99% 86:17.24 56%


However, 'top' shows I still have 7762meg of memory free.

Memory: 16G real, 7762M free, 80K swap in use, 8203M swap free


A vmstat shows the following.

procs memory page disk faults cpu
r b w swap free re mf pi po fr de sr s6 s1 s1 s1 in sy cs us sy id
0 0 0 16639088 8461488 0 0 0 0 0 0 0 0 82 95 0 4294967196 0 0 -561 -113 -1069
0 0 0 16172032 7959784 5301 3 16992 0 0 0 0 0 4 739 0 4266 9154 1265 25 12 63
0 1 0 16172032 7959848 1539 319 10020 0 0 0 0 0 0 321 0 3709 12723 1531 32 11 57
0 0 0 16172000 7959880 763 319 7772 0 0 0 0 0 1 234 0 3286 8636 1433 26 4 69
0 0 0 16172032 7959912 671 0 5756 0 0 0 0 0 1 179 0 3154 7395 1473 22 3 76

All my other servers are showing the same discrepancies in prstat and top. From vmstat and top, I still have alot of memory available.

Does anyone know how prstat derives the 99% of memory usage which I doubt is accurate at all.
# 2  
Old 12-28-2006
No one can read stuff when you squeeze out all of the blanks. Normally, when a user does not use code tags, I can edit a user's post and insert code tags to cause the spaces to be shown. Somehow you have removed the spaces so I cannot repair your post to readability.

prstat is trying to tell you that 99% of the stuff in virtual memory is also in physical memory. This is quite accurate and means you must have plenty of memory. The remaining 1% won't pop into existence until it is needed...some pages of a program are just never used.
# 3  
Old 12-28-2006
Thanks for the reply. Apologies for the spaces but strangely though I did not remove any spaces. Could be because of the missing code tags. The results were copied and pasted from Putty.

It's misleading though, this 99%. I do have servers running at 100% memory from prstat results but still have abundant memory available.

prstat -t

Code:
 NPROC USERNAME  SIZE   RSS MEMORY      TIME  CPU
   540 oracle   1529G 1519G   100%  66:53.19  54%

top

Code:
Memory: 16G real, 7949M free, 8203M swap free

vmstat

Code:
 procs     memory            page            disk          faults      cpu
 r b w   swap  free  re  mf pi po fr de sr s6 s1 s1 s1   in   sy   cs us sy id
 0 0 0 17085024 8945808 1350 200 1475 1 1 0 0 0 0 0  0 1350 1674  274 24  5 71

# 4  
Old 12-29-2006
Again, this means that 100% of the objects in virtual memory are also in physical memory. This does not mean that you have used 100% of physical memory. It means you had ALL of the physical memory that you are trying to use! Yes, you might some empty physical memory left over! prstat does not report anything about unused physical memory! You cannot use prstat to determine unused physical memory. prstat only sees physical memory in use. It cannot see unused physical memory.

Let's take an example... imagine a computer with 1024 Gigabytes of physical memory. You want to run one program that needs 1 gigabyte of memory. prstat sees that you are trying to use one gigabyte. prstat also sees that you managed to find one gigabyte to use. So it says that 100 % of virtual memory is in physical memory. What about the the other 1023 GB? prstat does not know about that. It is not claiming that the other 1023 GB is in use.
# 5  
Old 12-29-2006
Thanks alot for Perderabo for the detailed explaination, that really clears up everything. Cheers!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Format Top and prstat command output

need help with formatting output of command top and prstat. My requirment is to remove few columns and display remaining . But when i used awk to do that the output seems to be have gone vague, mixing the column values. After using awk to print particular column the output seems to have lost... (1 Reply)
Discussion started by: NarayanaPrakash
1 Replies

2. Shell Programming and Scripting

how to display some special results with AWK

I have a file like this: AAEQGAGNQPQH,,,,160,32,,,, AAGQDYNSPLH,,712,39,,,,,, AAGREGGNTEAF,26,,,,,,,,4 AAGSPQH,,,,8,5,,,, AAKKLGQFYNEQF,4,,6,,,7,,,2 AANSGGRYNEQF,,2747,3120,,,,,, AAQGGVGGELF,,,,5,,12,36,, AAQGLAGYYEQY,,25,13,,,,,, AAQRGNEQF,510,2,,,6,,6,,76 AAQTGENSPLH,,16,16,,,,,, The... (9 Replies)
Discussion started by: xshang
9 Replies

3. Solaris

prstat RSS memory

Hi everyone, was hoping someone might be able to help me understand what I am seeing on one of our solaris systems. prstat -s size -a is showing user oradba as being top virtual memory consumption. 639 oradba 3012G 2951G 100% 59:44:01 25% why is it saying 3012G size and 2951G RSS... (6 Replies)
Discussion started by: k4boy
6 Replies

4. Solaris

Free memory in top and prstat command

Hi Export, i execute 'top' command to show the free memory in Solaris host, but the read is much lower than the RSS value shown in prstat command. Which one can reflect the real status and it is possible the difference caused by any patch of OS? Top command (only 883 memory is free)... (3 Replies)
Discussion started by: eiga
3 Replies

5. Shell Programming and Scripting

Display echo results in three column

Dear Friends, I have my command output which displays on one row and values are now scrollable (vertical) 3 pages. How do i display those output in three column so that i no need to scroll? Example: dcadd$cat components 1.Caluculator 2.Diary ... ... 50.Mobile 51.Battery .. ...... (12 Replies)
Discussion started by: baluchen
12 Replies

6. Solaris

100% memory usage in prstat

Hi Guys, I have observed the Oracle (DB USER) is utilizing 100% of the memory in the prstat -a output. I am bit confused is it normal and if not how to bring it down? ABout the machine it is a SunOS 5.10 Generic_125100-10 sun4v sparc SUNW,Sun-Fire-T200. Please see below output of prstat -a... (12 Replies)
Discussion started by: Asteroid
12 Replies

7. AIX

Need a list of top 10 CPU using processes (also top 10 memory hogs, separately)

Okay, I am trying to come up with a multi-platform script to report top ten CPU and memory hog processes, which will be run by our enterprise monitoring application as an auto-action item when the CPU and Memory utilization gets reported as higher than a certain threshold I use top on other... (5 Replies)
Discussion started by: thenomad
5 Replies

8. UNIX for Dummies Questions & Answers

diff between prstat and top

what is the diff between prstat and top command in unix? can anyone tell me please? (2 Replies)
Discussion started by: venkatesht
2 Replies

9. AIX

TOP Results AIX 5.3

With the exception of the Oracle processes can anyone telll me what these other AIX processes are???? 1032 root 16 21 20K 8K 0.0 slp 0:22+ 145:55 0.0/ 0.5 Kernel (lrud) 51178 root 39 21 20K 20K 0.0 slp 0:12+ 7:10 0.0/ 0.0 Kernel (aioserver) ... (1 Reply)
Discussion started by: mcastill66
1 Replies

10. UNIX for Dummies Questions & Answers

How Can I Have Top Display The Top 20 Processes??

how can i do that in a script withough havin the script halt at the section where the top command is located. am writign a script that will send me the out put of unx commands if the load average of a machine goes beyond the recommended number. top -n 20 i want to save this output to a file... (1 Reply)
Discussion started by: TRUEST
1 Replies
Login or Register to Ask a Question