ITPub博客

首页 > Linux操作系统 > Linux操作系统 > SGA

SGA

原创 Linux操作系统 作者:yanggq 时间:2019-05-22 18:03:05 0 删除 编辑
experiment of Yong Huang
[note] In case you're interested in this test, other /etc/system parameters are
(from sysdef | grep -i shm):

sys/shmsys
2111934921 max shared memory segment size (SHMMAX)
1 min shared memory segment size (SHMMIN)
100 shared memory identifiers (SHMMNI)
200 max attached shm segments per process (SHMSEG)

database parameters are:

db_block_buffers 0
db_block_size 8192
db_cache_size 1912602624
hi_shared_memory_address 0
shared_memory_address 0
shared_pool_reserved_size 3355443
shared_pool_size 67108864

For obvious reasons, starting up an instance of 2GB SGA on a 512MB RAM Unix box
incurs very heavy swapping. In fact, the instance starting up with 2GB SGA on
this box logs a warning like this in alert.log:

WARNING: EINVAL creating segment of size 0x0000000080086000
fix shm parameters in /etc/system or equivalent

and

WARNING: Not enough physical memory for SHM_SHARE_MMU segment of size
0x0000000040000000 [flag=0x4000]

The latter warning implies ISM (intimate shared memory) is not enabled.

Also /usr/proc/pmap -x shows the multiple shared memory segments for
this instance (note that sgabeg, which is x80000000, loses its meaning):

Address Kbytes Resident Shared Private Permissions Mapped File
00010000 37688 14848 6800 8048 read/exec oracle
024EC000 304 216 72 144 read/write/exec oracle
02538000 912 560 - 560 read/write/exec [ heap ]
20000000 1032192 251880 456 251424 read/write/exec/shared [shmid=0x4]
5F000000 8 - - - read/shared [shmid=0x4]
5F002000 512 512 80 432 read/write/exec/shared [shmid=0x4]
5F082000 8 8 8 - read/shared [shmid=0x4]
5F084000 8 8 8 - read/write/exec/shared [shmid=0x4]
80000000 280 280 - 280 read/write/exec/shared [shmid=0x66]
81000000 1048576 55920 2208 53712 read/write/exec/shared [shmid=0x3]
EF000000 3904 2648 544 2104 read/exec libjox9.so
EF3DE000 160 160 - 160 read/write/exec libjox9.so
EF406000 8 - - - read/write/exec [ anon ]
EF4E0000 8 8 8 - read/write/exec/shared [ anon ]
EF4F0000 16 16 16 - read/exec libmp.so.2
EF502000 8 8 - 8 read/write/exec libmp.so.2
EF510000 88 56 24 32 read/exec libm.so.1
EF534000 8 8 - 8 read/write/exec libm.so.1
EF540000 8 8 8 - read/exec libkstat.so.1
EF550000 8 8 - 8 read/write/exec libkstat.so.1
EF560000 24 16 8 8 read/exec libposix4.so.1
EF574000 8 8 - 8 read/write/exec libposix4.so.1
EF580000 600 472 456 16 read/exec libc.so.1
EF624000 32 32 - 32 read/write/exec libc.so.1
EF62C000 8 8 - 8 read/write/exec [ anon ]
EF640000 24 24 24 - read/exec libaio.so.1
EF654000 16 16 8 8 read/write/exec libaio.so.1
EF660000 8 8 8 - read/exec libsched.so.1
EF670000 8 8 - 8 read/write/exec libsched.so.1
EF680000 456 352 344 8 read/exec libnsl.so.1
EF700000 40 40 - 40 read/write/exec libnsl.so.1
EF70A000 16 - - - read/write/exec [ anon ]
EF720000 16 16 16 - read/exec libc_psr.so.1
EF730000 8 - - - read/write/exec [ anon ]
EF740000 32 32 32 - read/exec libsocket.so.1
EF756000 8 8 - 8 read/write/exec libsocket.so.1
EF758000 8 - - - read/write/exec [ anon ]
EF760000 8 8 - 8 read/write/exec [ anon ]
EF770000 8 8 8 - read/exec libskgxp9.so
EF780000 8 8 - 8 read/write/exec libskgxp9.so
EF790000 8 8 8 - read/exec libodmd9.so
EF7A0000 8 8 - 8 read/write/exec libodmd9.so
EF7B0000 8 8 8 - read/exec libdl.so.1
EF7C0000 128 128 128 - read/exec ld.so.1
EF7EE000 16 16 - 16 read/write/exec ld.so.1
EFFFA000 24 24 - 24 read/write [ stack ]
-------- ------ ------ ------ ------
total Kb 2126232 328408 11280 317128

ipcs -b shows:

T ID KEY MODE OWNER GROUP SEGSZ
Shared Memory:
m 0 0x50000fff --rw-r--r-- root root 68
m 1 00000000 --rw-rw-rw- root root 4068
m 102 00000000 --rw-r----- oracle dba 286720
m 3 00000000 --rw-r----- oracle dba 1073741824
m 4 0x350cde58 --rw-r----- oracle dba 1057513472

According to Steve Adams (Oracle8i Internal Services, p.91), multiple shared
memory segments have slight negative impact on instance startup and process
creation.

But all that only tells us playing this game is impractical and has no real
use. The purpose of this experiment is for understanding shared memory segment
creation by Oracle.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26706/viewspace-64570/,如需转载,请注明出处,否则将追究法律责任。

下一篇: v$waitstat
请登录后发表评论 登录
全部评论

注册时间:2002-10-29

  • 博文量
    78
  • 访问量
    50756