Adjustment of IPC resources, kernel. shmmax, and Oracle shared memory (I) display and release of IPC Resources
[Plain] [root @ david ~] # Ipcs-m ------ Shared Memory Segments -------- key shmid owner perms bytes nattch status ...... 0xbe3bb918 5439503 oracle 640 419438592 22 [root @ david ~] # Ipcs-m-I 5439503 Shared memory Segment shmid = 5439503 uid = 501 gid = 502 cuid = 501 cgid = 502 mode = 0640 access_perms = 0640 bytes = 419438592 lpid = 5335 cpid = 5283 nattch = 21 att_time = Sat Jun 29 18:50:06 2013 det_time = Sat Jun 29 18:51:07 2013 change_time = Sat Jun 29 18:49:33 2013 note: cuid: ID of the user who created the shared memory cgid: ID of the group that created the shared memory lpid: PID nattch for the last access to the shared memory: Number of processes connected to the shared memory segment att_time: last time to call shmat () det_time: Last time to call shmdt () Time [shmdt function releases shared memory] change_time: The last time that shmctl () is used to modify the shared memory segment [shmctl deletes shared memory] [root @ david ~] # Ipcrm-m 5439503 [root @ david ~] # Ipcs-m ------ Shared Memory Segments -------- key shmid owner perms bytes nattch status ...... 0x00000000 5439503 oracle 640 419438592 20 dest the status changes to dest, and the key changes to 0x00000000 [root @ david ~] # Ipcs-m-I 5439503 Shared memory Segment shmid = 5439503 uid = 501 gid = 502 cuid = 501 cgid = 502 mode = 01640 access_perms = 0640 bytes = 419438592 lpid = 5993 cpid = 5283 nattch = 19 att_time = Sat Jun 29 19:29:42 2013 det_time = Sat Jun 29 19:29:42 2013 change_time = Sat Jun 29 18:49:33 2013
(Ii) shared memory shmmax Kernel Parameter defines the maximum value of a single shared memory segment. If this parameter is set less than the Oracle SGA setting, SGA will be allocated multiple shared memory segments, leading to performance degradation. To avoid for multiple shared memory segments, we can modify the shmmax kernel parameters so that SGA exists in one shared memory segment and modify the shmmax method:
1) directly edit/etc/sysctl. conf 2) sysctl-w kernel. shmmax = xxx 3) echo "kernel. shmmax = xxxx">/etc/sysctl. conf
After the modification, sysctl-p is in Oracle. If the NUMA feature is enabled, the shared memory needs to be segmented. This causes many bugs. DBAs must understand this feature when starting a feature. the ins and outs of a feature and a comprehensive evaluation of the impact of this feature! Therefore, we generally:
alter system set "_enable_numa_optimization"= false scope=spfile;
However, this hidden parameter to 11gR2 seems to have been abolished, and 11gR1 still exists. This also tells us from the side that Oracle's stuff, we still use R2 to be more secure. (3) view the Oracle shared memory. usage
[plain] sys@ORCL> oradebug setmypid Statement processed. sys@ORCL> oradebug ipc Information written to trace file. sys@ORCL> oradebug TRACEFILE_NAME /u01/app/oracle/admin/orcl/udump/orcl_ora_6161.trc
View the trc file in combination with ipcs-m-I shmid. I will not go into details here.