当前位置:操作系统 > Unix/Linux >>

Linux上shmmax参数的设置及含义

shmmax内核参数定义单个共享内存段的最大值,如果该参数设置小于Oracle SGA设置,那么SGA就会被分配多个共享内存段。这在繁忙的系统中可能成为性能负担,带来系统问题。

  Linux上该参数的缺省值通常为32M。

  [root@neirong root]# more /proc/sys/kernel/shmmax

  33554432

  可以通过ipcs命令查看此设置下共享内存的分配,我们可以看到Oracle分配了多个共享内存段以满足SGA设置的需要:

  [root@neirong root]# ipcs -sa

  ------ Shared Memory Segments --------

  key

  shmid

  owner

  perms

  bytes

  nattch

  status

  0x00000000 884736

  oracle

  640

  4194304

  14

  0x00000000 917505

  oracle

  640

  33554432

  14

  0x00000000 950274

  oracle

  640

  33554432

  14

  0x00000000 983043

  oracle

  640

  33554432

  14

  0x00000000 1015812

  oracle

  640

  33554432

  14

  0x00000000 1048581

  oracle

  640

  33554432

  14

  0x00000000 1081350

  oracle

  640

  33554432

  14

  0x00000000 1114119

  oracle

  640

  33554432

  14

  0x00000000 1146888

  oracle

  640

  33554432

  14

  0x00000000 1179657

  oracle

  640

  33554432

  14

  0x00000000 1212426

  oracle

  640

  33554432

  14

  0x00000000 1245195

  oracle

  640

  33554432

  14

  0x00000000 1277964

  oracle

  640

  33554432

  14

  0x00000000 1310733

  oracle

  640

  33554432

  14

  0x00000000 1343502

  oracle

  640

  33554432

  14

  0x00000000 1376271

  oracle

  640

  33554432

  14

  0x00000000 1409040

  oracle

  640

  33554432

  14

  0x00000000 1441809

  oracle

  640

  33554432

  14

  0x00000000 1474578

  oracle

  640

  33554432

  14

  0x00000000 1507347

  oracle

  640

  33554432

  14

  0x00000000 1540116

  oracle

  640

  33554432

  14

  0x00000000 1572885

  oracle

  640

  33554432

  14

  0x00000000 1605654

  oracle

  640

  33554432

  14

  0x00000000 1638423

  oracle

  640

  33554432

  14

  0x00000000 1671192

  oracle

  640

  33554432

  14

  0x00000000 1703961

  oracle

  640

  33554432

  14

  0x7a9c9900 1736730

  oracle

  640

  4194304

  56

  ------ Semaphore Arrays --------

  key

  semid

  owner

  perms

  nsems

  0xfcf02e10 229376

  oracle

  640

  154

  ------ Message Queues --------

  key

  msqid

  owner

  perms

  used-bytes

  messages

  使用pmap我们可以看到每个共享内存段的地址空间

  [root@neirong root]# ps -ef|grep 3102

  oracle

  3102

  1

  0 09:27 ?

  00:00:26 ora_dbw0_hsmkt

  root

  3447

  3397

  0 10:39 pts/4

  00:00:00 grep 3102

  [root@neirong root]# pmap 3102

  ora_dbw0_hsmkt[3102]

  08048000 (37308 KB)

  r-xp (68:06 1525072)

  /opt/oracle/product/9.2.0/bin/oracle

  0a4b7000 (8804 KB)

  rw-p (68:06 1525072)

  /opt/oracle/product/9.2.0/bin/oracle

  0ad50000 (380 KB)

  rw-p (00:00 0)

  50000000 (4096 KB)

  rw-s (00:04 884736)

  /SYSV00000000

  51000000 (32768 KB)

  rw-s (00:04 917505)

  /SYSV00000000

  53000000 (32768 KB)

  rw-s (00:04 950274)

  /SYSV00000000

  55000000 (32768 KB)

  rw-s (00:04 983043)

  /SYSV00000000

  57000000 (32768 KB)

  rw-s (00:04 1015812)

  /SYSV00000000

  59000000 (32768 KB)

  rw-s (00:04 1048581)

  /SYSV00000000

  5b000000 (32768 KB)

  rw-s (00:04 1081350)

  /SYSV00000000

  5d000000 (32768 KB)

  rw-s (00:04 1114119)

  /SYSV00000000

  5f000000 (32768 KB)

  rw-s (00:04 1146888)

  /SYSV00000000

  61000000 (32768 KB)

  rw-s (00:04 1179657)

  /SYSV00000000

  63000000 (32768 KB)

  rw-s (00:04 1212426)

  /SYSV00000000

  65000000 (32768 KB)

  rw-s (00:04 1245195)

  /SYSV00000000

  67000000 (32768 KB)

  rw-s (00:04 1277964)

  /SYSV00000000

  69000000 (32768 KB)

  rw-s (00:04 1310733)

  /SYSV00000000

  6b000000 (32768 KB)

  rw-s (00:04 1343502)

  /SYSV00000000

  6d000000 (32768 KB)

  rw-s (00:04 1376271)

  /SYSV00000000

  6f000000 (32768 KB)

  rw-s (00:04 1409040)

  /SYSV00000000

  71000000 (32768 KB)

  rw-s (00:04 1441809)

  /SYSV00000000

  73000000 (32768 KB)

  rw-s (00:04 1474578)

  /SYSV00000000

  75000000 (32768 KB)

  rw-s (00:04 1507347)

  /SYSV00000000

  77000000 (32768 KB)

  rw-s (00:04 1540116)

  /SYSV00000000

  79000000 (32768 KB)

  rw-s (00:04 1572885)

  /SYSV00000000

  7b000000 (32768 KB)

  rw-s (00:04 1605654)

  /SYSV00000000

  7d000000 (32768 KB)

  rw-s (00:04 1638423)

  /SYSV00000000

  7f000000 (32768 KB)

  rw-s (00:04 1671192)

  /SYSV00000000

  81000000 (32768 KB)

  rw-s (00:04 1703961)

  /SYSV00000000

  83000000 (4 KB)

  r--s (00:04 1736730)

  /SYSV7a9c9900

  83001000 (644 KB)

  rw-s (00:04 1736730)

  /SYSV7a9c9900

  830a2000 (4 KB)

  r--s (00:04 1736730)

  /SYSV7a9c9900

  830a3000 (3444 KB)

  rw-s (00:04 1736730)

  /SYSV7a9c9900

  b6ec2000 (44 KB)
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,