Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.
$ prstat -t
NPROC USERNAME  SWAP   RSS MEMORY      TIME  CPU
164 oracle   5446M 5445M   8.3%  13:47:50 1.6%
52 root      576M  728M   1.1%  42:29:50 1.0%
 1 noaccess  300M  273M   0.4%   0:20:54 0.0%
 1 smmsp    2192K 9912K   0.0%   0:00:06 0.0%
 1 nagios    584K 4256K   0.0%   0:01:54 0.0%
 6 daemon   8360K   11M   0.0%   0:12:39 0.0%

Total: 225 processes, 839 lwps, load averages: 1.68, 1.58, 1.46

Above is the output of prstat command on Solaris Box which has Oracle 11g installed. The RAM on the Solaris box is 64GB however the oracle process seems to be swapping around 5.5 GB, is that normal? Would appreciate any recommendations on getting more fine-grained information!

share|improve this question

1 Answer 1

up vote 4 down vote accepted

prstat defines SWAP as:

SWAP

    The sum of swap reservations of the associated processes
    for  each  user,  project,  task,  or  zone. This counts
    shared memory only once for each user, project, task, or
    zone.  Swap  is  reserved when anonymous memory is allo-
    cated or files are mapped private. The value of swap  is
    expressed  in kilobytes (K), megabytes (M), or gigabytes
    (G).

(from prstat(1M) on Solaris 10, cf. Open Solaris prstat)

Basically this means that the value includes memory that is currently not accessed yet but is mapped into the address space of a process. Such memory may be used in the future, and thus may be swapped out (i.e. written to a swap partition for real). Thus on creating the initial mapping Solaris prstat counts them as SWAP.

This does not mean that this amount of memory is actually written to the SWAP partition or is necessarily going to be written to it.

Those swap reservations, anonymous memory and mapped files are part of the virtual memory system of Solaris.

Also note that you are using -t - thus the shown value in your example is not the one of an oracle process but the aggregate value of all processes running under user oracle.

Using some Solaris port of top provides more useful information, i.e. a SIZE (or VMEM) and a RES (or RSS) value. VMEM includes all virtual memory pages and RSS is the resident size. With that the relation VMEM >= RSS is true (for prstat RSS may be > SWAP, i.e. RSS is not included in SWAP).

If you are concerned with actual swap activity you can use something like vmstat.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.