Case Study of Oracle Study-view the "strange phenomenon" of shared memory through IPCS"

Source: Internet
Author: User

Case Study of Oracle Study-view the "strange phenomenon" of shared memory through IPCS"

In the Oracle 11gR2 environment, using the ipcs command to view the shared memory, we found that the memory allocated to Oracle is only 4096 Bytes, and this problem was never found in the Oracle 10g environment!

[Root @ rh6 ~] # Ipcs-
------ Shared Memory Segments --------
Key shmid owner perms bytes nattch status
0x00000000 0 root 644 52 2
0x00000000 32769 root 644 16384 2
0x00000000 65538 root 644 268 2
0x00000000 98307 women's disease 600 393216 2 dest
0x00000000 131076 women's disease 600 393216 2 dest
0x00000000 163845 women's disease 600 393216 2 dest
0x00000000 196614 women's disease 600 393216 2 dest
0x00000000 229383 women's disease 600 393216 2 dest
0x4b4218ec 557064 oracle 660 4096 0
------ Semaphore Arrays --------
Key semid owner perms nsems
0x00000000 0 root 600 1
0x00000000 98305 root 600 1
0x000000a7 327682 root 600 1
0xbe61d9cc 983043 oracle 660 154
------ Message Queues --------
Key msqid owner perms used-bytes messages

Database Version:

At 16:27:09 SYS @ test3> select * from v $ version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-Production
PL/SQL Release 11.2.0.1.0-Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0-Production
NLSRTL Version 11.2.0.1.0-Production

The following two parameters are used to automatically manage the memory of cycle 11g:

16:27:19 SYS @ test3> show parameter mem
NAME TYPE VALUE
-----------------------------------------------------------------------------
Hi_shared_memory_address integer 0
Memory_max_target big integer 300 M
Memory_target big integer 300 M
Shared_memory_address integer 0

View the Oracle shared memory segment --------- IPCS in Oracle 11g

1. Will it be related to the memory_max_target parameter? Set it to 0 and restart the database.

At 16:28:11 SYS @ test3> alter system set memory_target = 0;
System altered.
 
16:36:44 SYS @ test3> show parameter mem
 
NAME TYPE VALUE
----------------------------------------------------------------------------------------
Hi_shared_memory_address integer 0
Memory_max_target big integer 300 M
Memory_target big integer 0
Shared_memory_address integer 0
 
16:30:51 SYS @ test3> startup force;
ORACLE instance started.
Total System Global Area 313860096 bytes
Fixed Size 1336232 bytes
Variable Size 205524056 bytes
Database Buffers 100663296 bytes
Redo Buffers 6336512 bytes
Database mounted.
Database opened.

Let's look at the shared memory:

[Oracle @ rh6 ~] $ Ipcs-
------ Shared Memory Segments --------
Key shmid owner perms bytes nattch status
0x00000000 0 root 644 52 2
0x00000000 32769 root 644 16384 2
0x00000000 65538 root 644 268 2
0x4b4218ec 622600 oracle 660 4096 0
------ Semaphore Arrays --------
Key semid owner perms nsems
0xbe61d9cc 1114115 oracle 660 154
------ Message Queues --------
Key msqid owner perms used-bytes messages

We found that the shared memory allocated to Oracle is still small, which does not seem to be a problem with the memory_target parameter!

2. Try to adjust the memory_max_target parameter and restore it to the default value of the system:

16:39:49 SYS @ test3> alter system set sga_max_size = 300 m scope = spfile;
System altered.
 
At 16:40:06 SYS @ test3> alter system reset memory_max_target scope = spfile sid = '*';
System altered.
 
16:40:40 SYS @ test3> startup force nomounted;
ORACLE instance started.
Total System Global Area 313860096 bytes
Fixed Size 1336232 bytes
Variable Size 205524056 bytes
Database Buffers 100663296 bytes
Redo Buffers 6336512 bytes
 
16:40:52 SYS @ test3> show parameter mem
NAME TYPE VALUE
----------------------------------------------------------------------------------------
Hi_shared_memory_address integer 0
Memory_max_target big integer 0
Memory_target big integer 0
Shared_memory_address integer 0
 
16:40:59 SYS @ test3> show parameter sga
NAME TYPE VALUE
----------------------------------------------------------------------------------------
Lock_sga boolean FALSE
Pre_page_sga boolean FALSE
Sga_max_size big integer 300 M
Sga_target big integer 180 M

View the system shared memory:

[Oracle @ rh6 ~] $ Ipcs-
------ Shared Memory Segments --------
Key shmid owner perms bytes nattch status
0x00000000 0 root 644 52 2
0x00000000 32769 root 644 16384 2
0x00000000 65538 root 644 268 2
0x4b4218ec 884744 oracle 660 316669952 16
------ Semaphore Arrays --------
Key semid owner perms nsems
0xbe61d9cc 1638403 oracle 660 154
------ Message Queues --------
Key msqid owner perms used-bytes messages

It seems that the memory_max_target parameter is set. As a result, the memory allocated to Oracle is 4096 Bytes through ipcs!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.