Oracle study Case-the "strange phenomenon" of viewing shared memory through IPCS

Source: Internet
Author: User
Tags semaphore

Oracle study Case-the "strange phenomenon" of viewing shared memory through IPCS

In an Oracle 11GR2 environment, the shared memory is viewed through the IPCS command, and it is found that only 4096Bytes of memory is allocated to Oracle, and this problem has never been found in Oracle 10g environments!

[[email protected] ~]# ipcs -a------ Shared Memory Segments -------- key        shmid      owner       perms      bytes       nattch     status0x00000000 0           root       644         52         20x00000000 32769       root       644        16384       20x00000000 65538      root        644        268         20x00000000 98307      gdm        600         393216     2           dest0x00000000 131076     gdm         600        393216      2          dest0x00000000 163845      gdm        600         393216     2           dest0x00000000 196614     gdm         600        393216     2           dest0x00000000 229383     gdm         600        393216     2           dest0x4b4218ec 557064      oracle     660        4096        0------ Semaphore Arrays --------key         semid      owner       perms      nsems0x00000000 0           root       600         10x00000000 98305      root        600        10x000000a7 327682     root        600        10xbe61d9cc 983043      oracle     660        154------  message queues --------key        msqid       owner      perms      used-bytes    messages

Database version:

16:27:09 [email protected] test3 >select * from V$version; BANNER--------------------------------------------------------------------------------Oracle Database 11g Enterprise Edition release 11.2.0.1.0-productionpl/sql release 11.2.0.1.0-productioncore 11.2.0.1.0 Production TNS for linux:version 11.2.0.1.0-productionnlsrtl Version 11.2.0.1.0-production

Oraccle 11g uses the following two parameters to automate the management of memory:

16:27:19 [email protected] test3 >show parameter memname                                   TYPE         value------------------------------------ ----------- ---------------------------- --hi_shared_memory_address              integer     0memory_max_target                     big integer 300mmemory_target                          big integer 300Mshared_memory_address                 integer     0 

650) this.width=650; "src=" Http://www.linuxidc.com/upload/2014_02/14021810205766.jpg "alt=" in Oracle 11g See Oracle's Shared Memory segment---------IPCS "width=" 581 "vspace=" 5 "style=" border:0px; "/>

1, whether it is the parameter memory_max_target has a relationship? Set it to 0, and then restart the database.

16:28:11 [email protected] test3 >alter system set memory_target=0  ; System altered.16:36:44 [email protected] test3 >show parameter memname                                   TYPE                     VALUE------------------------------------ ---------------------- ------------------------------Hi_ Shared_memory_address             integer                 0memory_max_ target                     big integer            300Mmemory_target                          big integer             0shared_memory_address                 integer                 016:30:51 [email protected] test3 >startup force ;oracle instance  started. total system global area  313860096 bytesfixed size                   1336232 bytesvariable  Size             205524056  bytesdatabase  buffers          100663296 bytesredo buffers                 6336512  Bytesdatabase mounted. database opened.

Look at Shared memory:

[[email protected] ~]$ ipcs -a------ Shared Memory Segments -------- key        shmid      owner       perms      bytes       nattch     status0x00000000 0           root       644         52         20x00000000 32769       root       644        16384       20x00000000 65538      root        644        268         20x4b4218ec 622600     oracle     660         4096       0------ Semaphore Arrays  --------key        semid       owner      perms      nsems0xbe61d9cc 1114115     oracle     660         154------ Message Queues --------Key        msqid       owner      perms       used-bytes   messages

found that the shared memory allocated to Oracle is still small, It doesn't seem to be a memory_target parameter problem. !


2, try to adjust the Memory_max_target parameter, restore it to the system default value:

16:39:49 [email protected] test3 >alter system set sga_max_size=300m  scope=spfile; System altered.16:40:06 [email protected] test3 >alter system reset  memory_max_target scope=spfile sid= ' * '; System altered.16:40:40 [email protected] test3 >startup force nomount;o Racle instance started. total system global area  313860096 bytesfixed size                   1336232 bytesvariable  Size             205524056  Bytesdatabase buffers          100663296 bytesredo  Buffers                 6336512 bytes16:40:52&nbsP [email protected] test3 >show parameter memname                                   TYPE                     VALUE------------------------------------ ---------------------- ------------------------------Hi_ Shared_memory_address             integer                 0memory_max_ target                     big integer             0memory_target                        big integer             0shared_memory_address                 integer                 016:40:59 [email protected]  test3 >show parameter sgaNAME                                   TYPE                    value------------------------------------ --------------- ------- ------------------------------lock_sga                              boolean                 FALSEpre_page_sga                           boolean                 FALSEsga_max_size                          big integer             300Msga_target                             big integer             180m

View system shared Memory:

[[email protected] ~]$ ipcs -a------ Shared Memory Segments -------- key        shmid      owner       perms      bytes       nattch     status0x00000000 0           root       644         52         20x00000000 32769       root       644        16384       20x00000000 65538      root        644        268         20x4b4218ec 884744     oracle     660         316669952  16------ Semaphore Arrays --------key         semid      owner       perms      nsems0xbe61d9cc 1638403     oracle     660        154------  message queues --------key        msqid       owner      perms      used-bytes    messages

It appears that the reason for setting the Memory_max_target parameter causes the memory allocated to Oracle to be seen by IPCS 4096bytes!


This article is from the "Tianya blog," Please make sure to keep this source http://tiany.blog.51cto.com/513694/1599787

Oracle study Case-the "strange phenomenon" of viewing shared memory 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.