Understanding prstat


 
Thread Tools Search this Thread
Operating Systems Solaris Understanding prstat
# 1  
Old 04-10-2013
Understanding prstat

Hello
We have a SPARC box running Solaris 10. We have 32 GB of physical memory, 32 GB of swap. Now i want to monitor memory usage for performance tuning. The box is running Sybase database. When I type prstat i get the following
Code:
  PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP
 16736 root      155M   11M sleep   59    0   0:50:08 1.7% java/50
 20973 sybase15   20G   14G sleep   60    0  13:29:25 1.5% dataserver/248
 21039 sybase15   20G   14G cpu17   31    0  12:10:08 1.4% dataserver/136
 21037 sybase15   20G   14G sleep   52    0  13:02:50 1.4% dataserver/264
 19546 sybase15   20G   14G sleep   58    0  31:49:14 1.2% dataserver/205
 20976 sybase15   20G   14G sleep   60    0  14:23:36 1.0% dataserver/114
 21042 sybase15   20G   14G cpu22    0    0  13:15:58 1.0% dataserver/264
 20986 sybase15   20G   14G cpu14   32    0  14:56:42 1.0% dataserver/204
 20967 sybase15   20G   14G sleep   60    0  15:36:49 1.0% dataserver/110
 21043 sybase15   20G   14G sleep   52    0  15:23:22 0.8% dataserver/264
 21040 sybase15   20G   14G sleep   59    0  12:51:42 0.8% dataserver/264
 20966 sybase15   20G   14G sleep   59    0  14:24:24 0.8% dataserver/264
 20964 sybase15   20G   14G sleep   55    0  16:36:37 0.8% dataserver/260
 20963 sybase15   20G   14G sleep   60    0  19:20:25 0.8% dataserver/264
 21038 sybase15   20G   14G sleep   59    0  12:49:25 0.7% dataserver/238
 21031 sybase15   20G   14G sleep   55    0  11:38:24 0.7% dataserver/168
 20979 sybase15   20G   14G sleep   52    0  13:52:33 0.7% dataserver/246
 21001 sybase15   20G   14G sleep   53    0  11:48:09 0.7% dataserver/185
 20965 sybase15   20G   14G sleep   54    0  16:04:59 0.6% dataserver/264
 21036 sybase15   20G   14G cpu29    0    0  12:54:52 0.5% dataserver/264
 12795 root      204M   32M sleep   59    0   0:02:51 0.5% java/58
 20971 sybase15   20G   14G sleep   54    0  14:41:37 0.4% dataserver/190
 20968 sybase15   20G   14G sleep   59    0  15:00:17 0.4% dataserver/216
 20981 sybase15   20G   14G sleep   54    0  14:24:49 0.3% dataserver/264
 21022 sybase15   20G   14G sleep   59    0  13:15:45 0.2% dataserver/217
 20984 sybase15   20G   14G sleep   58    0  15:01:33 0.2% dataserver/95
 21029 sybase15   20G   14G sleep   59    0  12:30:07 0.2% dataserver/232
 21034 sybase15   20G   14G sleep   59    0  12:26:57 0.2% dataserver/129
 21041 sybase15   20G   14G sleep   59    0  13:50:25 0.1% dataserver/253
 21007 sybase15   20G   14G sleep   59    0  15:22:16 0.1% dataserver/131
 19547 sybase15   11G   11G sleep   59    0  21:13:00 0.0% dataserver/264
     4 root        0K    0K sleep   60    -  95:59:52 0.0% cluster/1198
  2377 root      148M 4328K sleep   59  -20  31:43:38 0.0% perfd/3
  2596 root       34M 6472K sleep   59    0   5:08:10 0.0% opcmsga/12
  2230 root      143M 2872K sleep   60    0  30:18:21 0.0% scopeux/1
  2588 root       69M 2992K sleep   59    0   3:15:11 0.0% coda/8
  1760 root       63M 1304K sleep  101    -   9:22:36 0.0% rgmd/44
     8 root       20M 9936K sleep   59    0   0:32:40 0.0% svc.startd/14
 20406 sybase15   11G   11G sleep   59    0  13:43:42 0.0% dataserver/264
 20419 sybase15   11G   11G sleep   59    0  15:59:13 0.0% dataserver/264
 20408 sybase15   11G   11G sleep   59    0  14:14:08 0.0% dataserver/264
Total: 366 processes, 11897 lwps, load averages: 7.98, 7.14, 5.68

What i don't understand is: I have over a dozen processes each having an RSS of 14G how can that be possible if the total memory i have (physical + swap) is only 64GB?
Another thing, when i run prstat -a to see the summary I have memory consumption about 36% which i think is pretty misleading.
So how do i interpret the output of prstat, how can i know whether or not i am using SWAP space because this will definitely degrade the DB performance and pushes us towards the direction of upgrading memory?
# 2  
Old 04-10-2013
check this link
# 3  
Old 04-10-2013
Quote:
Originally Posted by abohmeed
What i don't understand is: I have over a dozen processes each having an RSS of 14G how can that be possible if the total memory i have (physical + swap) is only 64GB?
That's because of shared memory which is accounted for each process using it.
Quote:
Another thing, when i run prstat -a to see the summary I have memory consumption about 36% which i think is pretty misleading.
Why do you thing it is misleading ?
Quote:
So how do i interpret the output of prstat, how can i know whether or not i am using SWAP space because this will definitely degrade the DB performance and pushes us towards the direction of upgrading memory?
prstat is not the the right tool to use if you want to know if pagination occurs because of RAM exhaustion. You should instead have a look to vmstat output, especially the free and sr columns. swap -s and swap -l would also help.
This User Gave Thanks to jlliagre For This Post:
# 4  
Old 04-10-2013
Could you please shed some light on that "shared memory" thing because i don't fully understand this term. Does it mean that memory is allocated to whatever process is needing it and when when other processes need this memory they are kept in the queue until free? and does that affect performance?
# 5  
Old 04-10-2013
Quote:
Originally Posted by abohmeed
Does it mean that memory is allocated to whatever process is needing it and when when other processes need this memory they are kept in the queue until free?
More or less. That's areas of memory which instead of being privately owned by processes like regular ones, are, by program design, shared by various processes.
Quote:
and does that affect performance?
In the sense it improve performance, being faster than any other communication method, it does indeed.
This User Gave Thanks to jlliagre For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

prstat from ptree ...

Hi, I know how to figure out the list of PID from my application name : ptree `pgrep MyApp` | awk '{print $1}' But I dont know how to pipe it for prstat -p <pidlist> ptree `pgrep MyApp` | awk '{print $1}' | prstat -p ??? I would like to monitor every ptree PID from my application. ... (4 Replies)
Discussion started by: RickTrader
4 Replies

2. Shell Programming and Scripting

prstat output

hi all, have a ksh script where i am doing a prstat -m -u osuser 1 1 >> $FILE_NAME but for some reason it only writes 15 lines wheres when i run the same command manually from command prompt it prints out 60 lines. why is it not writing the full 60 lines to the file ?? ta. (1 Reply)
Discussion started by: cesarNZ
1 Replies

3. Solaris

prstat

hi all, was trying to figure out how busy my app was by looking at the performance of the app server. did a 'prstat -s rss' command to find the app servers using most memory. Found a command 'prstat -m' which is meant to show more details on each pid but the output of this command... (1 Reply)
Discussion started by: cesarNZ
1 Replies

4. Shell Programming and Scripting

prstat

hi all, am writing a ksh script on solaris 9 to get the number of threads taken by a process. am using the prstat -p command to do this. output i get is : :"/export/home/user" > prstat -p 25528 | cut -f2 -d/ NLWP 203 Total: 1 processes, 203 lwps, load averages: 2.58, 3.24, 3.62... (2 Replies)
Discussion started by: cesarNZ
2 Replies

5. Shell Programming and Scripting

prstat output in GB

Hi, Is there any way by which the unit of size and rss will be only GB while I am running the prstat command? (2 Replies)
Discussion started by: King Nothing
2 Replies

6. Solaris

prstat O/P

Good Evening everyone, I am confused about prstat O/P as it shows memory values which are different from actual value.Below is the O/P of prstat command and swap commands. NPROC USERNAME SIZE RSS MEMORY TIME CPU 48 root 2113M 1590M 1.2% 45:09.39 32% 31 daemon ... (7 Replies)
Discussion started by: vvpotugunta
7 Replies

7. Solaris

understanding the prstat log

Can some one please explain what does the memory part mean in the prstat logs? NPROC USERNAME SIZE RSS MEMORY TIME CPU 61 oracle 36G 33G 71% 109:44:26 12% 89 cemsbin 12G 9523M 20% 195:02:41 11% 2 adm 273M 199M 0.4% 47:05:42 2.3% 89 root ... (9 Replies)
Discussion started by: dipashre
9 Replies

8. Shell Programming and Scripting

prstat problem

This will be a smaple output for my prstat -t NPROC USERNAME SIZE RSS MEMORY TIME CPU 43 root 249M 62M 1.5% 33:50:01 0.1% 12 oadmin 1396M 862M 22% 0:06:49 0.1% 2 acne 3960K 3176K 0.1% 0:00:00 0.0% 4 essagent 10M 7456K 0.2% 0:00:00 0.0%... (6 Replies)
Discussion started by: vivsiv
6 Replies

9. Shell Programming and Scripting

prstat in shell

Hello, How can I do to use prstat command in a korn-shell ? Thanks a lot. Rgds. (4 Replies)
Discussion started by: madmat
4 Replies

10. UNIX for Dummies Questions & Answers

Help with prstat

Hello, The last line of prstat shows load average. I am unable to figure out what actually it is. I have read the man pages and also googled, all for no use. Can somebody help me, as to what should be the avg. load of the system for best performance and how is this load of prstat calculated. (6 Replies)
Discussion started by: vibhor_agarwali
6 Replies
Login or Register to Ask a Question