Pagesize

From pressy's brainbackup
Jump to: navigation, search

Solaris provides different memory page sizes, on SPARC up to 16gb. It does not always make sense to use 16gb also known as huge page sizes. The Oracle database chooses the size depending on their needs:

root@server:/# pagesize -a
8192
65536
4194304
268435456
2147483648
root@server:/# ps -ef | grep smon | wc -l
      25
root@server:/# prctl -n zone.max-shm-memory -i zone global
zone: 0: global
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
zone.max-shm-memory
        usage           47.5GB
        system          16.0EB    max   deny                                 -
root@server:/#
root@server:/# mdb -k
Loading modules: [ unix genunix specfs dtrace zfs scsi_vhci ldc mac ip hook neti ds arp kssl sockfs ipc random idm mdesc cpc crypto fcip fctl fcp ufs logindmux ptm sppp nsmb nfs ]
> ::memstat
Usage Type/Subtype                      Pages    Bytes  %Tot  %Tot/%Subt
---------------------------- ---------------- -------- ----- -----------
Kernel                               10657519    81.3g  6.7%
  Regular Kernel                      8204461    62.5g        5.1%/76.9%
  Defdump prealloc                    2453058    18.7g        1.5%/23.0%
ZFS                                   1986282    15.1g  1.2%
User/Anon                           142318553     1.0t 89.5%
  Regular User/Anon                  23403481   178.5g       14.7%/16.4%
  OSM                               118915072   907.2g       74.7%/83.5%
Exec and libs                          416779     3.1g  0.2%
Page Cache                             199137     1.5g  0.1%
Free (cachelist)                        46094   360.1m  0.0%
Free                                  3365972    25.6g  2.1%
Total                               158990336     1.1t  100%
>
> ::tile -s
TILE  MN  SZC   TOTAL   PCT    USER   PCT   KCAGE   PCT
           8k   86.6g 7.14%   39.9g 3.29%   46.6g 3.84%
          64k   70.5g 5.81%   70.5g 5.81%    2.1m 0.00%
           4m  109.8g 9.05%   99.2g 8.18%   10.5g 0.87%
         256m    134g 11.0%     89g 7.33%     45g 3.70%
           2g    140g 11.5%    140g 11.5%       -     -
          16g    672g 55.3%    672g 55.3%       -     -
   total         1.1t  100%    1.0t 91.5%  102.2g 8.42%
>
> ::tile -l
TILE  MN T  TOTAL  NOSZC     8k    64k     4m   256m     2g    16g   BUSY
   0   0 +    251     14     24     10     47    147      9      -      -
   1   0 +    256    133      1     25     58     39      -      -      -
   2   0 u    256    195      1     11     30     19      -      -      -
   3   0 u    256    128      -     25     20     19      -     64      -
   4   0 u    256     66      -     17     17     28      -    128      -
   5   0 u    256     66      -     13     12     37      -    128      -
   6   0 u    256    193      -     12     23     28      -      -      -
   7   0 u    127      5      -     16     17     33     56      -      -
   8   1 u    251    184      -      6     11      2     48      -      -
   9   1 u    256    128      -     10     52      2     64      -      -
   a   1 u    256    129      -     18     38      7      -     64      -
   b   1 u    256    130      1     10     53     38     24      -      -
   c   1 +    256    128      -     12     46      6      -     64      -
   d   1 u    256    129      -     11     45      7      -     64      -
   e   1 +    256    131      2     13     42      4      -     64      -
   f   1 +    127      6     21      3     12     85      -      -      -
  10   2 u    251    130      -      -      1      -     56     64      -
  11   2 +    256    128      -      -     60     12     56      -      -
  12   2 +    256     65      2      -     30     23     72     64      -
  13   2 +    256     44     20      1     25     78     24     64      -
  14   2 k      5      -      3      -      -      2      -      -      -
   total +   4852   2132     75    213    639    616    409    768      -
> ::tile -v
            TILE M   ID   MG MN PRI K T   TOTAL    FREE     OOB  CACHED  BORROW
     20600000000      0    0  0   - g +   62.7g    4.1g    3.2g   12.5m       -
                                      u   13.7g    1.4g    1.3g   12.5m       -
                                      k     49g    2.6g    1.8g       -       -
     20600008040      1    0  0   - g +     64g    2.9g    2.4g   11.7m    1.5m
                                      u   61.2g    2.2g    1.9g   11.7m       -
                                      k    2.7g  765.1m  548.7m       -    1.5m
     20600010080      2    0  0   - g u     64g  889.3m  889.3m   11.6m       -
     206000180c0      3    0  0   - g u     64g  522.7m  522.7m   13.6m       -
     20600020100      4    0  0   - g u     64g     56k     56k    680k       -
     20600028140      5    0  0   - g u     64g       -       -     32k       -
     20600030180      6    0  0   - g u     64g  537.2m  537.2m   22.0m       -
     206000381c0      7    0  0   - g u   31.7g  163.0m  159.2m   12.2m       -
     20600040200      8    1  1   - g u   62.7g    744k    744k    360k       -
     20600048240      9    1  1   - g u     64g  828.2m  828.2m    8.4m       -
     20600050280      a    1  1   - g u     64g  749.5m  749.5m   15.4m       -
     206000582c0      b    1  1   - g u     64g    1.1g  897.6m   22.2m       -
     20600060300      c    1  1   - g +     64g    1.0g    1.0g   32.4m       -
                                      u     63g    1.0g    1.0g   32.4m       -
                                      k      1g     52m       -       -       -
     20600068340      d    1  1   - g u     64g  987.1m  987.1m   15.5m       -
     20600070380      e    1  1   - g +     64g  830.3m  566.3m   26.2m       -
                                      u     62g  570.3m  566.3m   26.2m       -
                                      k      2g  260.0m       -       -       -
     206000783c0      f    1  1   - g +   31.7g    3.6g    1.1g    480k       -
                                      u      3g     88k     88k    480k       -
                                      k   28.7g    3.6g    1.1g       -       -
     20600080400     10    2  2   - g u   62.7g     16k     16k    128k       -
     20600088440     11    2  2   - g +     64g  728.2m  392.2m    1.2m   48.1m
                                      u   62.5g  604.1m  392.1m    1.2m       -
                                      k    1.5g  124.0m     64k       -   48.1m
     20600090480     12    2  2   - g +     64g  187.8m  183.8m    512k       -
                                      u     63g  135.8m  131.8m    512k       -
                                      k      1g     52m     52m       -       -
     206000984c0     13    2  2   - g +     64g    6.4g    3.3g    744k       -
                                      u     49g  116.9m  112.9m    744k       -
                                      k     15g    6.3g    3.2g       -       -
     206000a0500     14    2  2   - g k    1.2g       -       -       -       -
                                total +    1.1t   25.7g   17.7g  208.4m   49.6m
                                      u    1.0t   11.8g   10.9g  208.4m       -
                                      k  102.2g   13.9g    6.8g       -   49.6m
>