[20210126]探究oracle内存分配3.txt
--//上午做了一番探究,继续测试,我手工增加log_buffer看看如何分配.
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 sga
Total System Global Area 643084288 bytes
Fixed Size 2255872 bytes
Variable Size 205521920 bytes
Database Buffers 427819008 bytes
Redo Buffers 7487488 bytes
SYS@book> create pfile='/tmp/@.ora' from spfile ;
File created.
--//手工编辑/tmp/book.ora文件,修改log_buffer,仅仅比原来增加1个字节.
*.log_buffer=7487489
2.重启数据库:
SYS@book> shutdown immediate ;
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@book> startup pfile='/tmp/@.ora'
ORACLE instance started.
Total System Global Area 647278592 bytes
Fixed Size 2255872 bytes
Variable Size 205521920 bytes
Database Buffers 427819008 bytes
Redo Buffers 11681792 bytes
Database mounted.
Database opened.
--//Redo Buffers =11681792
--// (11681792-7487488)/4/1024/1024 = 1 ,我仅仅增加1个字节,就增级1个GRANULE_SIZE=4m.
$ ipcs -m
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 30605314 oracle 640 16777216 23
0x00000000 30638083 oracle 640 633339904 23
0xe8a8ec10 30670852 oracle 640 2097152 23
$ cat /proc/$(ps -ef | grep smo[n]| awk '{print $2}')/maps | grep SYSV
60000000-61000000 rw-s 00000000 00:0b 30605314 /SYSV00000000 (deleted)
61000000-86c00000 rw-s 00000000 00:0b 30638083 /SYSV00000000 (deleted)
86c00000-86e00000 rw-s 00000000 00:0b 30670852 /SYSVe8a8ec10 (deleted)
--//61000000 -60000000 = 16777216 .
--//占用4个GRANULE_SIZE.
--//Fixed Size+Redo Buffers = 2255872+11681792 = 13937664
--//13937664/4/1024/1024 = 3.322998046875
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/267265/viewspace-2753149/,如需转载,请注明出处,否则将追究法律责任。