同志们,如果linux的shmmax < oracle 的sga大小,那么就会把ORACLE的SGA分成N块shmmax的内存块 是吧 
SQL> show sga;Total System Global Area  167772160 bytes
Fixed Size                  1218316 bytes
Variable Size              79694068 bytes
Database Buffers           83886080 bytes
Redo Buffers                2973696 bytes
SQL>  
   [oracle@localhost ~]$ cat /etc/sysctl.conf  | grep shmmaxkernel.shmmax = 80000000
    
   为什么我查看的共享内存段只有一个啊:[oracle@localhost ~]$ ipcs -sa------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status
0x00000000 65537      oracle    640        4194304    13
0x00000000 98306      oracle    640        79691776   13
0x00000000 131075     oracle    640        79691776   13
0x229f8e04 163844     oracle    640        8388608    13------ Semaphore Arrays --------
key        semid      owner      perms      nsems
0x11769730 98304      oracle    640        154------ Message Queues --------
key        msqid      owner      perms      used-bytes   messages

解决方案 »

  1.   

    你从哪里看出只有一个?
    SELECT 4194304+79691776+79691776+8388608,167772160 FROM dual;
      

  2.   

    [oracle@localhost ~]$ cat /etc/sysctl.conf  | grep shmmaxkernel.shmmax = 80000000
    你的该参数设为(80000000/1024/1024)M,ORACLE也在严格遵守。
    不过,很显然,你的该参数值偏小。
      

  3.   

        谢谢上面的解答
    0x00000000 65537      oracle    640        4194304    13
    0x00000000 98306      oracle    640        79691776   13
    0x00000000 131075     oracle    640        79691776   13
    0x229f8e04 163844     oracle    640        8388608    13
        看共享内存段的时候不是只看非0x00000000 的吗?0x00000000 和0x229f8e04 又有啥区别呢
      

  4.   

    shmmax 是在系统级别内可用于system V 机制共享内存的最大值,oracle 的sga 所使用的内存就在这里面。所以oracle 的sga 不可能高于shmmax的。ps: shmmax 的单位是pagesize;
    oracle@localhost:~$ getconf PAGESIZE
    4096
    如果你的pagesize 也是如此的话,你的shmmax 的大小应该为80000000*4=32k