대부분의 DBMS는 메모리 영역을 3가지로 분류를 한다.

DB2 입장에서는 인스턴스 영역, 데이터베이스 영역, Application 영역 식으로 표현할 수 있겠지만, 다른 DBMS인 경우는 다르게 표현될 것이다.

DBM CFG 및 DB CFG의 메모리 설정 값은 총 값(인스턴스 메모리가 DB 공유메모리를 포함함)을  의미하지만, 모니터링을 통한 각 값은 분리되어 확인이 된다.

V8.x 에서는 db2mtrk를 통하여 확인을 할 수 있었지만, V9.x 부터는 뷰(snapdbm_memory_pool 등)를 통해서 확인할 수 있다.

인스턴스 사용 메모리 크기

명령어

db2 “db2mtrk -i –v”                 

결과

Tracking Memory on: 2011/12/26 at 15:35:25

Memory for instance

   Other Memory is of size 30212096 bytes
   FCMBP Heap is of size 15859712 bytes
   Database Monitor Heap is of size 327680 bytes
   Total: 46399488 bytes


명령어

db2 +p –tv << EOF

select pool_id, sum(pool_cur_size) instance_mem_tsize
from sysibmadm.snapdbm_memory_pool
group by grouping sets(pool_id,())
with ur;

EOF

결과

POOL_ID        INSTANCE_MEM_TSIZE 
-------------- --------------------
-                          21561344
FCMBP                        851968
MONITOR                      327680
OTHER                      20381696

 

데이터베이스 메모리 크기

명령어
db2 “db2mtrk -d –v”

결과

Memory for database: SAMPLE

   Backup/Restore/Util Heap is of size 65536 bytes
   Package Cache is of size 786432 bytes
   Other Memory is of size 196608 bytes
   Catalog Cache Heap is of size 393216 bytes
   Buffer Pool Heap (1) is of size 8650752 bytes
   Buffer Pool Heap (System 32k buffer pool) is of size 851968 bytes
   Buffer Pool Heap (System 16k buffer pool) is of size 589824 bytes
   Buffer Pool Heap (System 8k buffer pool) is of size 458752 bytes
   Buffer Pool Heap (System 4k buffer pool) is of size 393216 bytes
   Shared Sort Heap is of size 0 bytes
   Lock Manager Heap is of size 17629184 bytes
   Database Heap is of size 19791872 bytes
   Application Heap (13) is of size 65536 bytes
   Application Heap (12) is of size 65536 bytes
   Application Heap (11) is of size 196608 bytes
   Application Heap (10) is of size 65536 bytes
   Application Heap (9) is of size 65536 bytes
   Application Heap (8) is of size 65536 bytes
   Application Heap (7) is of size 65536 bytes
   Applications Shared Heap is of size 458752 bytes
   Total: 50855936 bytes


명령어
db2 +p –tv << EOF

select substr(db_name,1,8) dbname,
       pool_id,
       sum(pool_cur_size) db_mem_tsize
from sysibmadm.snapdb_memory_pool
group by grouping sets(db_name, pool_id)
with ur;
EOF

 

Application & Private 사용 메모리 크기

명령어
db2 “db2mtrk –a –p  –v”

결과

Application Memory for database: SAMPLE

   Applications Shared Heap is of size 524288 bytes
   Total: 524288 bytes

  Memory for application 13

   Application Heap is of size 65536 bytes
   Other Memory is of size 196608 bytes
   Total: 262144 bytes

  Memory for application 12

   ……………

Memory for agent 33

   Other Memory is of size 196608 bytes
   Total: 196608 bytes

Memory for agent 32

   Other Memory is of size 196608 bytes
   Total: 196608 bytes

    ………………


명령어
db2 +p –tv << EOF

select substr(db_name,1,8) dbname, pool_id, sum(pool_cur_size) app_mem_tsize
from sysibmadm.snapagent_memory_pool
group by grouping sets(db_name,pool_id)
with ur
;

EOF

+ Recent posts