如果Linux核心參數設定不當或者不合理,Oracle也會出錯,比如
10g中:
SQL> startup;
ORA-27102: out of memory
Linux-x86_64 Error: 28: No space left on device
11g RAC下報錯:
SQL> startup;
ORA-00845: MEMORY_TARGET not supported on this system
本為總結下oracle資料庫在linux下相關核心參數的配置
Linux核心參數大致概括為4類:共用記憶體(shared memory),訊號量(semaphores),網路參數(network),檔案參數(open files)
1.共用記憶體
記憶體查看:
[root@oraserv ~]# free -m
total used free shared buffers cached
Mem: 249 123 125 0 8 74
-/+ buffers/cache: 41 208
Swap: 2000 0 2000
共用記憶體是用於處理序間通訊的一種機制,共用記憶體可以由指定的多個進程共用,是一種系統資源。共用記憶體以段的形式分配,段有最大最小,可分配數量有限。
共用記憶體允許兩個或更多進程訪問同一塊記憶體,就如同 malloc() 函數向不同進程返回了指向同一個實體記憶體地區的指標。當一個進程改變了這塊地址中的內容的時候,其它進程都會察覺到這個更改。
所有共用記憶體塊的大小都必須是系統頁面大小的整數倍。系統頁面大小指的是系統中單個記憶體頁麵包含的位元組數。在 Linux 系統中,記憶體頁面大小是4KB,不過仍然應該通過調用 getpagesize 擷取這個值(單位位元組)。
[root@oraserv ~]# getconf PAGE_SIZE
4096
[root@oraserv ~]# ipcs -l
------ Shared Memory Limits --------
max number of segments = 4096 // SHMMNI
max seg size (kbytes) = 4194303 // SHMMAX
max total shared memory (kbytes) = 1073741824 // SHMALL
min seg size (bytes) = 1
------ Semaphore Limits --------
max number of arrays = 128 // SEMMNI
max semaphores per array = 250 // SEMMSL
max semaphores system wide = 32000 // SEMMNS
max ops per semop call = 100 // SEMOPM
semaphore max value = 32767
------ Messages: Limits --------
max queues system wide = 16 // MSGMNI
max size of message (bytes) = 65536 // MSGMAX
default max size of queue (bytes) = 65536 // MSGMNB