Prstat rss and swap | Unix Linux Forums | Solaris

  Go Back    


Solaris The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

Prstat rss and swap

Solaris


Tags
prstat, rss, swap

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-17-2013
sunnys7143 sunnys7143 is offline
Registered User
 
Join Date: Jun 2013
Last Activity: 18 June 2013, 5:40 AM EDT
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Display Prstat rss and swap

Hi,

someone please explain me what's the difference b/w rss and swap in PRSTAT.

i'm getting output like below,

NPROC USERNAME SWAP RSS MEMORY TIME CPU
70 weblogic 48G 46G 73% 449:17:03 0.4%

swap always remains 48G, but rss will change frequently,, now, there is a difference of 2GB in b/w swap and rss, that means weblogic can use another 2GB??

correct me if im wrong..

Thanks in advance.
Sponsored Links
    #2  
Old 06-17-2013
hergp hergp is offline Forum Advisor  
Problem Eliminator
 
Join Date: Jan 2010
Last Activity: 27 November 2014, 8:54 AM EST
Location: Vienna, Austria
Posts: 806
Thanks: 18
Thanked 171 Times in 153 Posts
SWAP means the total virtual memory size of the process, while rss means the portion of the vitual memory which is actually in physical memory.

See Man Page for prstat (opensolaris Section 1) - The UNIX and Linux Forums for more information
Sponsored Links
    #3  
Old 06-17-2013
jlliagre jlliagre is offline Forum Advisor  
ɹǝsn sıɹɐlos
 
Join Date: Dec 2007
Last Activity: 27 November 2014, 10:48 PM EST
Location: Paris
Posts: 4,454
Thanks: 17
Thanked 480 Times in 432 Posts
swap it the size of the process virtual memory space (includes RAM but also swap area and unused yet reserved space)
rss is the subset of the former metric currently stored in RAM.

Edit: hergp was clearly faster ...
    #4  
Old 06-17-2013
sunnys7143 sunnys7143 is offline
Registered User
 
Join Date: Jun 2013
Last Activity: 18 June 2013, 5:40 AM EDT
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Then RSS can utilize/extend to maximum size of memory in SWAP ... correct ??
here my scenario is, some of the processes are getting crashed when RSS size almost reaches SWAP size, then it cannot allocate new memory in it..
correct me if im wrong..

Thanks
Sponsored Links
    #5  
Old 06-17-2013
hergp hergp is offline Forum Advisor  
Problem Eliminator
 
Join Date: Jan 2010
Last Activity: 27 November 2014, 8:54 AM EST
Location: Vienna, Austria
Posts: 806
Thanks: 18
Thanked 171 Times in 153 Posts
That's right. The operating system tries to avoid this situation by paging (and swapping). But if a process protects too much of it's address space against paging, it sometimes has a really hard time to do so.
Sponsored Links
    #6  
Old 06-17-2013
sunnys7143 sunnys7143 is offline
Registered User
 
Join Date: Jun 2013
Last Activity: 18 June 2013, 5:40 AM EDT
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by hergp View Post
That's right. The operating system tries to avoid this situation by paging (and swapping). But if a process protects too much of it's address space against paging, it sometimes has a really hard time to do so.
thanks a lot,
currently rss is reaching size.

Code:
PID USERNAME  SIZE   RSS STATE  PRI NICE      TIME  CPU PROCESS/NLWP       
12503 weblogic 3048M 2968M sleep   59    0   6:32:06 0.1% java/150

so, if it RSS reaches SIZE , then OS tries to use the new memory in swap. here, can't we manually increase the size of the process. OR any parameter to limit the process size , so that we can increase it.
Sponsored Links
    #7  
Old 06-17-2013
jlliagre jlliagre is offline Forum Advisor  
ɹǝsn sıɹɐlos
 
Join Date: Dec 2007
Last Activity: 27 November 2014, 10:48 PM EST
Location: Paris
Posts: 4,454
Thanks: 17
Thanked 480 Times in 432 Posts
Quote:
Originally Posted by sunnys7143 View Post
Then RSS can utilize/extend to maximum size of memory in SWAP ... correct ??
The RSS value is always less than or equal than the SWAP value, but both of these are dynamic.
SWAP is not a hard limit as the process is free to allocate more memory, i.e. increase its prtstat SWAP value.
Quote:
here my scenario is, some of the processes are getting crashed when RSS size almost reaches SWAP size, then it cannot allocate new memory in it..
correct me if im wrong.
Your process should be able to allocate more virtual memory unless the OS has no more virtual memory free or if the process itself has a hard limit configured (eg: java -Xmx).
Use "swap -s" to figure it out.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
prstat RSS memory k4boy Solaris 6 10-26-2010 09:48 PM
RSS pmap and prstat deivo Solaris 0 07-13-2010 04:51 PM
Swap device file and swap sapce lamoul HP-UX 6 03-04-2010 09:14 AM
swap not defined as swap dplinux Red Hat 5 10-30-2009 03:53 AM
Swap config - Mirror swap or not? BG_JrAdmin Solaris 3 01-06-2008 10:25 PM



All times are GMT -4. The time now is 01:41 AM.