Thursday, June 13, 2013

Solaris 10 Memory usage

Quick guide to determine if Solaris 10 is low on memory:

1.Firstly, how much “physical” memory is allocated:

$ /usr/sbin/prtconf
System Configuration:  Oracle Corporation  sun4v
Memory size: 16384 Megabytes
....

2. Is revolutions of the clock hand non-zero and increasing (say 1+ a minute). Revolutions of the clock is set to 0 on system startup. If it is non-zero but everything appears fine now then it indicates there may have been a problem in the past.

vmstat -s
....
      843 revolutions of the clock hand
....

3. Scan rate in vmstat, consistently non-zero value in the hundreds+

vmstat 1 1000 | awk '{printf("sr = %d\n",$12);}' 
 

4.Is current memory free less than a few hundred MB? pagesize = 8192, used for calculation below (sr in vmstat reported in pages).

$ /usr/bin/pagesize
8192
(in GB):
$ sar -r 1 1000 | awk '{printf("memfree %.2f\n",($2*8192)/1024/1024/1024);}'
...
memfree 0.31
memfree 0.30
memfree 0.28
...

5. Is the ‘w’ (wait) column in vmstat consistently non-zero? w column:

$ vmstat 1
 kthr      memory            page            disk          faults      cpu
 r b w   swap  free  re  mf pi po fr de sr vc vc vc vc   in   sy   cs us sy id
 0 0 105 20514416 6943200 379 532 328 702 1539 0 26970 35 26 31 2 5342 14534 8187 3 4 93
 1 0 93 30418504 12141008 33 32 0 0 0 0  0  0  0  0  0 1212 3252 1163  0  1 99
 0 0 93 30418312 12141072 30 14 0 0 0 0  0  0  0  1  0 1172 1657 1089  0  1 99
 1 0 93 30410120 12136976 30 14 0 0 0 0  0  0  0  0  0 1149 1618 1080  0  0 99

If yes to all above, what is using the most memory?

prstat -s size -Z
...

  9705 grid      487M  470M sleep   59    0   0:00:00 0.0% oracle/1
  9695 grid      487M  472M sleep   59    0   0:00:00 0.0% oracle/1
ZONEID    NPROC  SWAP   RSS MEMORY      TIME  CPU ZONE
     0      182   13G   13G    84%   6:07:50 6.2% global
...

No comments:

Post a Comment