[20191220]关于共享内存段相关问题.txt

--//我一直很好奇如果设置内核参数kernel.shmmax = 68719476736足够大,为什么我的测试实例还是建立3个共享内存段.
--//最后1个很特殊key=0xe8a8ec10,大小2M,我看过许多服务器只要key<>=0x00000000,最后都会有1个2M的共享内存段.
--//oracle为什么不是建立1个共享内存段呢?简单探究看看.

1.测试环境:
SYS@book> @ ver1
PORT_STRING                    VERSION        BANNER
------------------------------ -------------- --------------------------------------------------------------------------------
x86_64/Linux 2.4.xx            11.2.0.4.0     Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production

SYS@book> show parameter sga_max_size
NAME         TYPE        VALUE
------------ ----------- -----
sga_max_size big integer 620M
--//Granule Size=4194304

$ ipcs -m
------ Shared Memory Segments --------
key        shmid      owner      perms      bytes      nattch     status
0x00000000 423034880  oracle    640        12582912   20
0x00000000 423067649  oracle    640        633339904  20
0xe8a8ec10 423100418  oracle    640        2097152    20

$ ipcs -m | awk '{print $5/1024/1024}' | grep -v "^0"
12
604
2

2.一些参数设置:
SYS@book> show parameter db_cache_size
NAME          TYPE        VALUE
------------- ----------- ------
db_cache_size big integer 408M

SYS@book> show parameter shared_pool_size
NAME             TYPE        VALUE
---------------- ----------- ------
shared_pool_size big integer 172M

SYS@book> show parameter java_pool_size
NAME           TYPE        VALUE
-------------- ----------- -----
java_pool_size big integer 12M

SYS@book> show parameter large_pool_size
NAME            TYPE        VALUE
--------------- ----------- ------
large_pool_size big integer 12M

SYS@book> show parameter sga_max_size
NAME         TYPE        VALUE
------------ ----------- -----
sga_max_size big integer 616M

--//注:我的测试环境一直采用手动管理.设置db_cache_size=408,shared_pool_size=172M,java_pool_size=12M,large_pool_size=12M,sga_max_size=616M.
--//剩下616-172-408-12-12= 12M.这12M正好和前面ipcs -m看到的第一共享内存段相对应.

3.测试与验证:
$ cat memalloc.sql
col component format a32
select min(BASEADDR), max(BASEADDR), count(1) Granules, sum(a.gransize)/1048576 MB, a.GRANFLAGS, component, a.GRANSTATE
from x$ksmge a, x$kmgsct b
where a.grantype = b.grantype (+)
group by a.GRANFLAGS, component, a.GRANSTATE
order by 1,2;

pause press enter .....

select a.BASEADDR, a.gransize, a.GRANFLAGS, b.component, a.GRANSTATE
from x$ksmge a, x$kmgsct b
where a.grantype = b.grantype (+)
order by 1,2;

SYS@book> @ memalloc
MIN(BASEADDR)    MAX(BASEADDR)      GRANULES         MB  GRANFLAGS COMPONENT            GRANSTATE
---------------- ---------------- ---------- ---------- ---------- -------------------- ----------------
0000000060C00000 000000007A000000        102        408          4 DEFAULT buffer cache ALLOC
000000007A400000 000000007AC00000          3         12          4 java pool            ALLOC
000000007B000000 000000007B800000          3         12          4 large pool           ALLOC
000000007BC00000 0000000086400000         43        172          4 shared pool          ALLOC
press enter .....

BASEADDR           GRANSIZE  GRANFLAGS COMPONENT                        GRANSTATE
---------------- ---------- ---------- -------------------------------- ----------------
0000000060C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000061000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000061400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000061800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000061C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000062000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000062400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000062800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000062C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000063000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000063400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000063800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000063C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000064000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000064400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000064800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000064C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000065000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000065400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000065800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000065C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000066000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000066400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000066800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000066C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000067000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000067400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000067800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000067C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000068000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000068400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000068800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000068C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000069000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000069400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000069800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000069C00000    4194304          4 DEFAULT buffer cache             ALLOC
000000006A000000    4194304          4 DEFAULT buffer cache             ALLOC
000000006A400000    4194304          4 DEFAULT buffer cache             ALLOC
000000006A800000    4194304          4 DEFAULT buffer cache             ALLOC
000000006AC00000    4194304          4 DEFAULT buffer cache             ALLOC
000000006B000000    4194304          4 DEFAULT buffer cache             ALLOC
000000006B400000    4194304          4 DEFAULT buffer cache             ALLOC
000000006B800000    4194304          4 DEFAULT buffer cache             ALLOC
000000006BC00000    4194304          4 DEFAULT buffer cache             ALLOC
000000006C000000    4194304          4 DEFAULT buffer cache             ALLOC
000000006C400000    4194304          4 DEFAULT buffer cache             ALLOC
000000006C800000    4194304          4 DEFAULT buffer cache             ALLOC
000000006CC00000    4194304          4 DEFAULT buffer cache             ALLOC
000000006D000000    4194304          4 DEFAULT buffer cache             ALLOC
000000006D400000    4194304          4 DEFAULT buffer cache             ALLOC
000000006D800000    4194304          4 DEFAULT buffer cache             ALLOC
000000006DC00000    4194304          4 DEFAULT buffer cache             ALLOC
000000006E000000    4194304          4 DEFAULT buffer cache             ALLOC
000000006E400000    4194304          4 DEFAULT buffer cache             ALLOC
000000006E800000    4194304          4 DEFAULT buffer cache             ALLOC
000000006EC00000    4194304          4 DEFAULT buffer cache             ALLOC
000000006F000000    4194304          4 DEFAULT buffer cache             ALLOC
000000006F400000    4194304          4 DEFAULT buffer cache             ALLOC
000000006F800000    4194304          4 DEFAULT buffer cache             ALLOC
000000006FC00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000070000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000070400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000070800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000070C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000071000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000071400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000071800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000071C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000072000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000072400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000072800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000072C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000073000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000073400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000073800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000073C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000074000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000074400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000074800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000074C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000075000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000075400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000075800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000075C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000076000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000076400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000076800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000076C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000077000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000077400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000077800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000077C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000078000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000078400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000078800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000078C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000079000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000079400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000079800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000079C00000    4194304          4 DEFAULT buffer cache             ALLOC
000000007A000000    4194304          4 DEFAULT buffer cache             ALLOC
000000007A400000    4194304          4 java pool                        ALLOC
000000007A800000    4194304          4 java pool                        ALLOC
000000007AC00000    4194304          4 java pool                        ALLOC
000000007B000000    4194304          4 large pool                       ALLOC
000000007B400000    4194304          4 large pool                       ALLOC
000000007B800000    4194304          4 large pool                       ALLOC
000000007BC00000    4194304          4 shared pool                      ALLOC
000000007C000000    4194304          4 shared pool                      ALLOC
000000007C400000    4194304          4 shared pool                      ALLOC
000000007C800000    4194304          4 shared pool                      ALLOC
000000007CC00000    4194304          4 shared pool                      ALLOC
000000007D000000    4194304          4 shared pool                      ALLOC
000000007D400000    4194304          4 shared pool                      ALLOC
000000007D800000    4194304          4 shared pool                      ALLOC
000000007DC00000    4194304          4 shared pool                      ALLOC
000000007E000000    4194304          4 shared pool                      ALLOC
000000007E400000    4194304          4 shared pool                      ALLOC
000000007E800000    4194304          4 shared pool                      ALLOC
000000007EC00000    4194304          4 shared pool                      ALLOC
000000007F000000    4194304          4 shared pool                      ALLOC
000000007F400000    4194304          4 shared pool                      ALLOC
000000007F800000    4194304          4 shared pool                      ALLOC
000000007FC00000    4194304          4 shared pool                      ALLOC
0000000080000000    4194304          4 shared pool                      ALLOC
0000000080400000    4194304          4 shared pool                      ALLOC
0000000080800000    4194304          4 shared pool                      ALLOC
0000000080C00000    4194304          4 shared pool                      ALLOC
0000000081000000    4194304          4 shared pool                      ALLOC
0000000081400000    4194304          4 shared pool                      ALLOC
0000000081800000    4194304          4 shared pool                      ALLOC
0000000081C00000    4194304          4 shared pool                      ALLOC
0000000082000000    4194304          4 shared pool                      ALLOC
0000000082400000    4194304          4 shared pool                      ALLOC
0000000082800000    4194304          4 shared pool                      ALLOC
0000000082C00000    4194304          4 shared pool                      ALLOC
0000000083000000    4194304          4 shared pool                      ALLOC
0000000083400000    4194304          4 shared pool                      ALLOC
0000000083800000    4194304          4 shared pool                      ALLOC
0000000083C00000    4194304          4 shared pool                      ALLOC
0000000084000000    4194304          4 shared pool                      ALLOC
0000000084400000    4194304          4 shared pool                      ALLOC
0000000084800000    4194304          4 shared pool                      ALLOC
0000000084C00000    4194304          4 shared pool                      ALLOC
0000000085000000    4194304          4 shared pool                      ALLOC
0000000085400000    4194304          4 shared pool                      ALLOC
0000000085800000    4194304          4 shared pool                      ALLOC
0000000085C00000    4194304          4 shared pool                      ALLOC
0000000086000000    4194304          4 shared pool                      ALLOC
0000000086400000    4194304          4 shared pool                      ALLOC
151 rows selected.

--//测试环境都是手动管理,内存分配都是连续的.
--//如果你仔细看MIN(BASEADDR),MAX(BASEADDR)可以发现是首尾相连的.
--//4*1024*1024 = 4194304 = = 0x400000
--//MAX(BASEADDR)+0x400000正好等于下一行的MIN(BASEADDR).

$ ps -ef | grep lgw[r]
oracle   19717     1  0 09:25 ?        00:00:02 ora_lgwr_book

$ cat /proc/19717/smaps  | grep -A1 SYSV
60000000-60c00000 rw-s 00000000 00:0b 451543040                          /SYSV00000000 (deleted)
Size:              12288 kB
--
60c00000-86800000 rw-s 00000000 00:0b 451575809                          /SYSV00000000 (deleted)
Size:             618496 kB
--
86800000-86a00000 rw-s 00000000 00:0b 451608578                          /SYSVe8a8ec10 (deleted)
Size:               2048 kB
--//这些信息也可以对上.
--//还可以看出执行@ memalloc看到的内容就是ipcs -m的第2个共享内存段.

--//查询v$sgainfo
SYS@book> select * from v$sgainfo ;
NAME                                          BYTES RES
---------------------------------------- ---------- ---
Fixed SGA Size                              2255872 No
Redo Buffers                                7487488 No
Buffer Cache Size                         427819008 Yes
Shared Pool Size                          180355072 Yes
Large Pool Size                            12582912 Yes
Java Pool Size                             12582912 Yes
Streams Pool Size                                 0 Yes
Shared IO Pool Size                               0 Yes
Granule Size                                4194304 No
Maximum SGA Size                          643084288 No
Startup overhead in Shared Pool           133446832 No
Free SGA Memory Available                         0
12 rows selected.

--//Fixed SGA Size+Redo Buffers = 2255872+7487488 = 9743360, 9743360/1024/1024 = 9.29M.
--//从视图v$sgainfo可以看出Fixed SGA Size,Redo Buffers一定在ipcs -m输出的第1个共享内存段内.
--//你可以尝试修改log_buffer大小,变化一定在ipcs -m输出的第1个共享内存段内.我不贴上来了.
--//而Fixed SGA Size与参数processes存在密切关系.

4.继续测试:
--//链接:http://blog.itpub.net/267265/viewspace-2667945/=>[20191211]11g streams_pool_size参数.txt
$ expdp scott/book
...

--//再看oracle内存分配情况:
SYS@book> @ memalloc
MIN(BASEADDR)    MAX(BASEADDR)      GRANULES         MB  GRANFLAGS COMPONENT                        GRANSTATE
---------------- ---------------- ---------- ---------- ---------- -------------------------------- ----------------
0000000060C00000 0000000061C00000          5         20          4 streams pool                     ALLOC
0000000062000000 0000000086400000         48        192          4 shared pool                      ALLOC
0000000063400000 000000007A000000         92        368          4 DEFAULT buffer cache             ALLOC
000000007A400000 000000007AC00000          3         12          4 java pool                        ALLOC
000000007B000000 000000007B800000          3         12          4 large pool                       ALLOC
press enter .....

BASEADDR           GRANSIZE  GRANFLAGS COMPONENT                        GRANSTATE
---------------- ---------- ---------- -------------------------------- ----------------
0000000060C00000    4194304          4 streams pool                     ALLOC
0000000061000000    4194304          4 streams pool                     ALLOC
0000000061400000    4194304          4 streams pool                     ALLOC
0000000061800000    4194304          4 streams pool                     ALLOC
0000000061C00000    4194304          4 streams pool                     ALLOC
0000000062000000    4194304          4 shared pool                      ALLOC
0000000062400000    4194304          4 shared pool                      ALLOC
0000000062800000    4194304          4 shared pool                      ALLOC
0000000062C00000    4194304          4 shared pool                      ALLOC
0000000063000000    4194304          4 shared pool                      ALLOC
0000000063400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000063800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000063C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000064000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000064400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000064800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000064C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000065000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000065400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000065800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000065C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000066000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000066400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000066800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000066C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000067000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000067400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000067800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000067C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000068000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000068400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000068800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000068C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000069000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000069400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000069800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000069C00000    4194304          4 DEFAULT buffer cache             ALLOC
000000006A000000    4194304          4 DEFAULT buffer cache             ALLOC
000000006A400000    4194304          4 DEFAULT buffer cache             ALLOC
000000006A800000    4194304          4 DEFAULT buffer cache             ALLOC
000000006AC00000    4194304          4 DEFAULT buffer cache             ALLOC
000000006B000000    4194304          4 DEFAULT buffer cache             ALLOC
000000006B400000    4194304          4 DEFAULT buffer cache             ALLOC
000000006B800000    4194304          4 DEFAULT buffer cache             ALLOC
000000006BC00000    4194304          4 DEFAULT buffer cache             ALLOC
000000006C000000    4194304          4 DEFAULT buffer cache             ALLOC
000000006C400000    4194304          4 DEFAULT buffer cache             ALLOC
000000006C800000    4194304          4 DEFAULT buffer cache             ALLOC
000000006CC00000    4194304          4 DEFAULT buffer cache             ALLOC
000000006D000000    4194304          4 DEFAULT buffer cache             ALLOC
000000006D400000    4194304          4 DEFAULT buffer cache             ALLOC
000000006D800000    4194304          4 DEFAULT buffer cache             ALLOC
000000006DC00000    4194304          4 DEFAULT buffer cache             ALLOC
000000006E000000    4194304          4 DEFAULT buffer cache             ALLOC
000000006E400000    4194304          4 DEFAULT buffer cache             ALLOC
000000006E800000    4194304          4 DEFAULT buffer cache             ALLOC
000000006EC00000    4194304          4 DEFAULT buffer cache             ALLOC
000000006F000000    4194304          4 DEFAULT buffer cache             ALLOC
000000006F400000    4194304          4 DEFAULT buffer cache             ALLOC
000000006F800000    4194304          4 DEFAULT buffer cache             ALLOC
000000006FC00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000070000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000070400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000070800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000070C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000071000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000071400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000071800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000071C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000072000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000072400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000072800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000072C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000073000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000073400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000073800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000073C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000074000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000074400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000074800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000074C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000075000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000075400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000075800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000075C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000076000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000076400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000076800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000076C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000077000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000077400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000077800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000077C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000078000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000078400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000078800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000078C00000    4194304          4 DEFAULT buffer cache             ALLOC
0000000079000000    4194304          4 DEFAULT buffer cache             ALLOC
0000000079400000    4194304          4 DEFAULT buffer cache             ALLOC
0000000079800000    4194304          4 DEFAULT buffer cache             ALLOC
0000000079C00000    4194304          4 DEFAULT buffer cache             ALLOC
000000007A000000    4194304          4 DEFAULT buffer cache             ALLOC
000000007A400000    4194304          4 java pool                        ALLOC
000000007A800000    4194304          4 java pool                        ALLOC
000000007AC00000    4194304          4 java pool                        ALLOC
000000007B000000    4194304          4 large pool                       ALLOC
000000007B400000    4194304          4 large pool                       ALLOC
000000007B800000    4194304          4 large pool                       ALLOC
000000007BC00000    4194304          4 shared pool                      ALLOC
000000007C000000    4194304          4 shared pool                      ALLOC
000000007C400000    4194304          4 shared pool                      ALLOC
000000007C800000    4194304          4 shared pool                      ALLOC
000000007CC00000    4194304          4 shared pool                      ALLOC
000000007D000000    4194304          4 shared pool                      ALLOC
000000007D400000    4194304          4 shared pool                      ALLOC
000000007D800000    4194304          4 shared pool                      ALLOC
000000007DC00000    4194304          4 shared pool                      ALLOC
000000007E000000    4194304          4 shared pool                      ALLOC
000000007E400000    4194304          4 shared pool                      ALLOC
000000007E800000    4194304          4 shared pool                      ALLOC
000000007EC00000    4194304          4 shared pool                      ALLOC
000000007F000000    4194304          4 shared pool                      ALLOC
000000007F400000    4194304          4 shared pool                      ALLOC
000000007F800000    4194304          4 shared pool                      ALLOC
000000007FC00000    4194304          4 shared pool                      ALLOC
0000000080000000    4194304          4 shared pool                      ALLOC
0000000080400000    4194304          4 shared pool                      ALLOC
0000000080800000    4194304          4 shared pool                      ALLOC
0000000080C00000    4194304          4 shared pool                      ALLOC
0000000081000000    4194304          4 shared pool                      ALLOC
0000000081400000    4194304          4 shared pool                      ALLOC
0000000081800000    4194304          4 shared pool                      ALLOC
0000000081C00000    4194304          4 shared pool                      ALLOC
0000000082000000    4194304          4 shared pool                      ALLOC
0000000082400000    4194304          4 shared pool                      ALLOC
0000000082800000    4194304          4 shared pool                      ALLOC
0000000082C00000    4194304          4 shared pool                      ALLOC
0000000083000000    4194304          4 shared pool                      ALLOC
0000000083400000    4194304          4 shared pool                      ALLOC
0000000083800000    4194304          4 shared pool                      ALLOC
0000000083C00000    4194304          4 shared pool                      ALLOC
0000000084000000    4194304          4 shared pool                      ALLOC
0000000084400000    4194304          4 shared pool                      ALLOC
0000000084800000    4194304          4 shared pool                      ALLOC
0000000084C00000    4194304          4 shared pool                      ALLOC
0000000085000000    4194304          4 shared pool                      ALLOC
0000000085400000    4194304          4 shared pool                      ALLOC
0000000085800000    4194304          4 shared pool                      ALLOC
0000000085C00000    4194304          4 shared pool                      ALLOC
0000000086000000    4194304          4 shared pool                      ALLOC
0000000086400000    4194304          4 shared pool                      ALLOC
151 rows selected.
--//注:这里看shared pool被分成2部分.
--//DEFAULT buffer cache=408-368 = 40M.前面40M被分给streams pool=20M,shared poo=20M.

SYS@book> select * from v$sgainfo ;
NAME                                          BYTES RES
---------------------------------------- ---------- ---
Fixed SGA Size                              2255872 No
Redo Buffers                                7487488 No
Buffer Cache Size                         385875968 Yes
Shared Pool Size                          201326592 Yes
Large Pool Size                            12582912 Yes
Java Pool Size                             12582912 Yes
Streams Pool Size                          20971520 Yes
Shared IO Pool Size                               0 Yes
Granule Size                                4194304 No
Maximum SGA Size                          643084288 No
Startup overhead in Shared Pool           133446832 No
Free SGA Memory Available                         0
12 rows selected.
--//注:与我链接测试不同http://blog.itpub.net/267265/viewspace-2667945/,我当时Shared Pool Size没有变化.

5.总结:
--//也就是从以上测试可以看出,oracle启动建立的第1个共享内存段主要包括Fixed SGA Size +Redo Buffers.可以大概猜测
--//oracle启动为什么会出现这样的情况.

[20191220]关于共享内存段相关问题.txt的更多相关文章

  1. 在Oracle 11g中用看Oracle的共享内存段---------IPCS

    很早之前,在一次讲课了,用了命令ipcs,发现oracle的共享内段好小,如下: oracle@mydb ~]$ ipcs -a ------ Shared Memory Segments ----- ...

  2. zabbix_agentd重装后启动时IPC和共享内存段问题

    zabbix_agentd不知为啥被干掉后重装了zabbix,zabbix用户组id也变了. 重装zabbix后导致zabbix_agentd无法启动,两个问题 问题1: zabbix_agentd ...

  3. linux 共享内存 shmat,shmget,shmdt,shmctl

    shmget int shmget(key_t key, size_t size, int flag);//开辟一段共享内存 key_t key :标识符的规则() size_t size :共享内存 ...

  4. Linux进程间通信(六):共享内存 shmget()、shmat()、shmdt()、shmctl()

    下面将讲解进程间通信的另一种方式,使用共享内存. 一.什么是共享内存 顾名思义,共享内存就是允许两个不相关的进程访问同一个逻辑内存.共享内存是在两个正在运行的进程之间共享和传递数据的一种非常有效的方式 ...

  5. linux进程间通信-共享内存

    转载:http://www.cnblogs.com/fangshenghui/p/4039720.html 一 共享内存介绍 共享内存可以从字面上去理解,就把一片逻辑内存共享出来,让不同的进程去访问它 ...

  6. Linux共享内存(一)

    inux系统编程我一直看 <GNU/LINUX编程指南>,只是讲的太简单了,通常是书和网络上的资料结合着来掌握才比较全面 .在掌握了书上的内容后,再来都其他资料 . 原文链接 http:/ ...

  7. IPC_共享内存

    在IPC(InterProcess Communication)的通信模式下,不管是使用消息队列还是共享内存,甚至是信号量,每个IPC的对象(object)都有唯一的名字,称为“键”(key).通过“ ...

  8. Linux进程间通信——使用共享内存

    一.什么是共享内存 顾名思义,共享内存就是允许两个不相关的进程访问同一个逻辑内存.共享内存是在两个正在运行的进程之间共享和传递数据的一种非常有效的方式.不同进程之间共享的内存通常安排为同一段物理内存. ...

  9. IPC——共享内存

    Linux进程间通信——使用共享内存 下面将讲解进程间通信的另一种方式,使用共享内存.   一.什么是共享内存 顾名思义,共享内存就是允许两个不相关的进程访问同一个逻辑内存.共享内存是在两个正在运行的 ...

随机推荐

  1. 【实用工具】使用Java封装可执行exe应用全过程

    目录 编写java代码 打包 创建exe文件 压缩 总结 本文将使用exe4j将java项目封装为可以发送给他人使用的工具为例,来记录将java项目封装为exe文件的全过程 编写java代码 目标:创 ...

  2. Mybatis底层源码分析

    MyBatis 流程图 Configuration.xml 该配置文件是 MyBatis 的全局配置文件,在这个文件中可以配置诸多项目.常用的内容是别名设置,拦截器设置等. Properties(属性 ...

  3. 551. 学生出勤纪录 I

    给定一个字符串来代表一个学生的出勤纪录,这个纪录仅包含以下三个字符: 'A' : Absent,缺勤 'L' : Late,迟到 'P' : Present,到场 如果一个学生的出勤纪录中不超过一个' ...

  4. MySQL 05

    目录 事务 基本概念 四大特性(ACID) 使用方法 存储引擎 视图 基本概念 使用方法 触发器 基本概念 使用方法 存储过程 基本概念 使用方法 数据备份 备份 导入 函数 事务 基本概念 事务: ...

  5. 【Jackson】使用学习

    Jackson学习 文档:http://tutorials.jenkov.com/java-json/index.html https://github.com/FasterXML/jackson/w ...

  6. js重学

    js重学 数据类型 基本数据类型: Undefined.Null.Number.Boolean.String 复杂数据类型:Object Object:由一组无序键值对组成 typeof 未定义--u ...

  7. Centos7调整root分区大小

    由于centos安装完毕后一般给root只有50G左右,而home牛大, 所以多数时候需要把home弄小,root给扩展大一点 折腾一下 首先切好用户到root用户登陆,我用的systemctl se ...

  8. JBPM4常用表结构及入门流程

    JBPM4 常用表结构 第一部分:表结构说明 Jbpm4 共有18张表,如下,其中红色的表为经常使用的表   一:资源库与运行时表结构 1.  JBPM4_DEPLOYMENT 流程定义表 2.  J ...

  9. 一起学Spring之Web基础篇

    概述 在日常的开发中Web项目集成Spring框架,已经越来越重要,而Spring框架已经成为web开发的主流框架之一.本文主要讲解Java开发Web项目集成Spring框架的简单使用,以及使用Spr ...

  10. c++-多态和vptr指针

    多态的原理 #define _CRT_SECURE_NO_WARNINGS #include <iostream> using namespace std; class Parent { ...