天天看點

(原創)oracle相關核心參數及信号量詳解

kernel.shmmni 參數是控制共享記憶體段總數量

kernel.shmall 參數是控制共享記憶體頁數,是全部允許使用的共享記憶體總量

shmall=shmmax/pagesize

( getconf PAGE_SIZE ) 。

kernel.shmmax 是單個共享記憶體段允許使用的最大值

shmmax 設定應該足夠大,能在一個共享記憶體段下容納下整個的SGA ,設定的過低可能會

導緻需要建立多個共享記憶體段,這樣可能導緻系統性能的下降

一般設定shmmax >=SGA

英文原文:

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

可以使用 ipcs -l 看結果。ipcs -u 可以看到實際使用的情況

  ------ Shared Memory Limits --------

   max number of segments = 4096            // SHMMNI

   max seg size (kbytes) = 32768               // SHMMAX

   max total shared memory (kbytes) = 8388608  // 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 = SEMMSL* SEMMNI系統範圍的最大信号量數量

   max ops per semop call = 32                 // SEMOPM每個信号量支援的最大操作數

   semaphore max value = 32767

   ------ Messages: Limits --------

   max queues system wide = 1024             // MSGMNI  整個系統的最大數量的消息隊列

   max size of message (bytes) = 65536         // MSGMAX  每個消息的最大長度(表示從一個程序發送到另一個程序的消息的最大長度,程序間的消息傳遞是在核心的記憶體中進行)

   default max size of queue (bytes) = 65536    // MSGMNB  每個消息隊列的最大位元組限制

#kernel.sem=<semmsl> <semmni>*<semmsl> <semopm> <semmni>

kernel.sem=250 32000 100 128

net.core.rmem_max     — 最大的TCP資料接收緩沖區大小(機關位元組)

net.core.rmem_default — 預設的TCP資料接收緩沖區大小(機關位元組)

net.core.wmem_max     — 最大的TCP資料發送緩沖區大小(機關位元組)

net.core.wmem_default — 預設的TCP資料發送緩沖區大小(機關位元組)

fs.file-max    系統所有程序一共可以打開的檔案數量

fs.aio-max-nr  所允許的并發請求的最大個數

net.ipv4.ip_local_port_range 表示應用程式可使用的IPv4端口範圍