kernel.shmmax 参数
说明
SHMMAX Available physical memory Defines the maximum allowable size of one shared memory segment. The SHMMAX setting should be large enough to hold the entire SGA in one shared memory segment. A low setting can cause creation of multiple shared memory segments which may lead to performance degradation.
[oracle@edsir4p1-PROD1 ~]$ cat /etc/sysctl.conf | grep kernel.shmmax
kernel.shmmax =20971520
[oracle@edsir4p1-PROD1 ~]$ sqlplus / as sysDBA
SQL*Plus: Release 11.2.0.1.0 Production on Fri Apr 8 09:18:08 2016
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL>
SQL>
SQL> startup
ORACLE instance started.
Total System Global Area 636100608 bytes
Fixed Size 1338392 bytes
Variable Size 184550376 bytes
Database Buffers 444596224 bytes
Redo Buffers 5615616 bytes
Database mounted.
Database opened.
[oracle@edsir4p1-PROD1 ~]$ ipcs -sa
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 32768 vncuser 644 790528 2 dest
0x00000000 65537 vncuser 644 790528 2 dest
0x00000000 98306 vncuser 644 790528 2 dest
0x00000000 393225 oracle 600 393216 2 dest
0x00000000 425994 oracle 600 393216 2 dest
0x00000000 458763 oracle 600 393216 2 dest
0x00000000 491532 oracle 600 393216 2 dest
0x00000000 557070 oracle 600 393216 2 dest
0x00000000 589839 oracle 600 393216 2 dest
0x00000000 622608 oracle 600 393216 2 dest
0x00000000 655377 oracle 600 393216 2 dest
0x00000000 1179666 oracle 660 8388608 21
0x00000000 1212435 oracle 660 20971520 21
0x00000000 851988 oracle 600 393216 2 dest
0x00000000 884757 oracle 600 393216 2 dest
0x00000000 1245207 oracle 660 20971520 21
0x00000000 1277976 oracle 660 20971520 21
0x00000000 1310745 oracle 660 20971520 21
0x00000000 1343514 oracle 660 20971520 21
0x00000000 1376283 oracle 660 20971520 21
0x00000000 1409052 oracle 660 20971520 21
0x00000000 1441821 oracle 660 20971520 21
0x00000000 1474590 oracle 660 20971520 21
0x00000000 1507359 oracle 660 20971520 21
0x00000000 1540128 oracle 660 20971520 21
0x00000000 1572897 oracle 660 20971520 21
0x00000000 1605666 oracle 660 20971520 21
0x00000000 1638435 oracle 660 20971520 21
0x00000000 1671204 oracle 660 20971520 21
0x00000000 1703973 oracle 660 20971520 21
0x00000000 1736742 oracle 660 20971520 21
0x00000000 1769511 oracle 660 20971520 21
0x00000000 1802280 oracle 660 20971520 21
0x00000000 1835049 oracle 660 20971520 21
0x00000000 1867818 oracle 660 20971520 21
0x00000000 1900587 oracle 660 20971520 21
0x00000000 1933356 oracle 660 20971520 21
0x00000000 1966125 oracle 660 20971520 21
0x00000000 1998894 oracle 660 20971520 21
0x00000000 2031663 oracle 660 20971520 21
0x00000000 2064432 oracle 660 20971520 21
0x00000000 2097201 oracle 660 20971520 21
0x00000000 2129970 oracle 660 20971520 21
0x00000000 2162739 oracle 660 20971520 21
0x90c3be20 2195508 oracle 660 4194304 21
------ Semaphore Arrays --------
key semid owner perms nsems
0xa3dda878 622592 oracle 660 154
------ Message Queues --------
key msqid owner perms used-bytes messages
改大一些
kernel.shmmax =1416800938
[oracle@edsir4p1-PROD1 ~]$ ipcs -sa
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 32768 vncuser 644 790528 2 dest
0x00000000 65537 vncuser 644 790528 2 dest
0x00000000 98306 vncuser 644 790528 2 dest
0x00000000 393225 oracle 600 393216 2 dest
0x00000000 425994 oracle 600 393216 2 dest
0x00000000 458763 oracle 600 393216 2 dest
0x00000000 491532 oracle 600 393216 2 dest
0x00000000 557070 oracle 600 393216 2 dest
0x00000000 589839 oracle 600 393216 2 dest
0x00000000 622608 oracle 600 393216 2 dest
0x00000000 655377 oracle 600 393216 2 dest
0x90c3be20 2261010 oracle 660 641728512 21
0x00000000 851988 oracle 600 393216 2 dest
0x00000000 884757 oracle 600 393216 2 dest
3. kernel.shmall
kernel.shmall 参数是控制共享内存页数。该参数大小为物理内存除以pagesize;
查看os系统页的大小
#getconf PAGESIZE
4096
这里显示的pagesize 是4k,假设一个共享内存段的最大大小是16G,那么需要共享内存页数是 16GB/4KB=16777216KB/4KB=4194304 (页),也就是64Bit系统下16GB 物理内存,设置 kernel.shmall = 4194304 才符合要求,几乎是原来设置2097152的两倍。
4. kernel.shmmni 参数
shmmni 内核参数是共享内存段的最大数量(注意这个参数不是 shmmin,是
shmmni, shmmin 表示内存段最小大小 )。shmmni 缺省值 4096 ,一般肯定是够用了。 |
|