SHMALL, SHMMAX and SGA sizing

Question: I need to confirm my Linux kernel settings and also get pointers/explanation on how i need to properly setup my kernel for proper operation of the Oracle Server. My aim for the SR is not so much to get actual answers on how to set values. Rather, I need help to clear up the concepts behind the numbers. From the output of the commands below it can be seen that the server has 12 GB of memory and after the kernel is configured (see below output of ipcs -lms command), I have SHMMAX set at 8589933568. After consulting various documents I have come to understand the following, please verify: - The largest SGA size is that defined by PAGESIZE*kernel.shmall (in this case 16GB, which is a mistake apparently as the system only has 12GB of RAM) - It is OK for shmmax to be smaller than the requested SGA. If additional size is needed, then the space will be allocated in multiple pages, as long as the size does not exceed PAGESIZE*kernel.shmall - If more than one Oracle instances reside on the same server, then Linux Kernel settings will have to cater for the largest instance SGA, since - ... different instances will hold completely different memory segments, which will have to seperately adhere to kernel limitations, therefore the kernel limitations do not care for multiple instances, as those are different memory areas - Memory for SGA is allocated completely by setting SGA_TARGET. In a different case, it will be allocated as needed $ free total used free shared buffers cached Mem: 12299352 8217844 4081508 0 190816 6799828 -/+ buffers/cache: 1227200 11072152 Swap: 16775764 90912 16684852 ipcs -lms ------ Shared Memory Limits -------- max number of segments = 4096 max seg size (kbytes) = 8388607 max total shared memory (kbytes) = 16777216 min seg size (bytes) = 1 ------ Semaphore Limits -------- max number of arrays = 128 max semaphores per array = 250 max semaphores system wide = 32000 max ops per semop call = 32000 semaphore max value = 32767 also 'getconf PAGESIZE' returns 4096 Answer: - The largest SGA size is that defined by PAGESIZE*kernel.shmall (in this case 16GB, which is a mistake apparently as the system only has 12GB of RAM) Comment : Yes this needs to comply with the formula : kernel.shmall = physical RAM size / pagesize as per NOTE:339510.1 . - It is OK for shmmax to be smaller than the requested SGA. If additional size is needed, then the space will be allocated in multiple pages, as long as the size does not exceed PAGESIZE*kernel.shmall Comment : Yes it is ok to have SHMMAX<SGASIZE NOTE:567506.1 . The allocation will be done in multiple shared segments either contigues or non contiguous as per NOTE:15566.1 - If more than one Oracle instances reside on the same server, then Linux Kernel settings will have to cater for the largest instance SGA, since different instances will hold completely different memory segments, which will have to seperately adhere to kernel limitations, therefore the kernel limitations do not care for multiple instances, as those are different memory areas. Comment : Yes thats valid for the SHMMAX , but for the SHMALL it is a systemwide kernel variable affected by the physical memory and the pagesize . - Memory for SGA is allocated completely by setting SGA_TARGET. In a different case, it will be allocated as needed. comment : Memory for the SGA is allocated completely by the SGA_MAX_SIZE .
I need to confirm my Linux kernel settings and also get pointers/explanation on how i need to properly setup my kernel for proper operation of the Oracle Server. My aim for the SR is not so much to get actual answers on how to set values. Rather, I need help to clear up the concepts behind the numbers. From the output of the commands below it can be seen that the server has 12 GB of memory and after the kernel is configured (see below output of ipcs -lms command), I have SHMMAX set at 8589933568. After consulting various documents I have come to understand the following, please verify: - The largest SGA size is that defined by PAGESIZE*kernel.shmall (in this case 16GB, which is a mistake apparently as the system only has 12GB of RAM) - It is OK for shmmax to be smaller than the requested SGA. If additional size is needed, then the space will be allocated in multiple pages, as long as the size does not exceed PAGESIZE*kernel.shmall - If more than one Oracle instances reside on the same server, then Linux Kernel settings will have to cater for the largest instance SGA, since - ... different instances will hold completely different memory segments, which will have to seperately adhere to kernel limitations, therefore the kernel limitations do not care for multiple instances, as those are different memory areas - Memory for SGA is allocated completely by setting SGA_TARGET. In a different case, it will be allocated as needed $ free total used free shared buffers cached Mem: 12299352 8217844 4081508 0 190816 6799828 -/+ buffers/cache: 1227200 11072152 Swap: 16775764 90912 16684852 ipcs -lms ------ Shared Memory Limits -------- max number of segments = 4096 max seg size (kbytes) = 8388607 max total shared memory (kbytes) = 16777216 min seg size (bytes) = 1 ------ Semaphore Limits -------- max number of arrays = 128 max semaphores per array = 250 max semaphores system wide = 32000 max ops per semop call = 32000 semaphore max value = 32767 also 'getconf PAGESIZE' returns 4096  

你可能感兴趣的:(linux,memory,SGA,pagesize,shmmax)