안녕하세요. 주디아줌마입니다.
인덱스 튜닝을 위해서는 인덱스별 인덱스 사이즈 확인하고 싶을 때 사용할 수 있는 툴~~
툴 소개 : https://github.com/jwilder/mongodb-tools
참고링크
CentOS 5.3 + Python 2.6 + modwsgi + django 1.1 설치
http://blog.naver.com/PostView.nhn?blogId=aries84&logNo=100157702157
인덱스 참고 자료
https://openshift.redhat.com/community/blogs/design-and-performance-tips-for-mongodb-indexes http://support.serverdensity.com/knowledgebase/articles/76002-mongodb-ram-headroomhttp://support.serverdensity.com/knowledgebase/articles/93364-mongodb-index-stats
collection_stats.py
index_stats.py
redundant_indexes.py
collection-stats.py (Collection 통계 )
$ ./collection-stats.py
Checking DB: examples2.system.indexes
Checking DB: examples2.things
Checking DB: examples1.system.indexes
Checking DB: examples1.address
Checking DB: examples1.typeless_address
Checking DB: examples1.user
Checking DB: examples1.typeless_user
+----------------------------+--------+--------+---------+--------------+---------+------------+
| Collection | Count | % Size | DB Size | Avg Obj Size | Indexes | Index Size |
+----------------------------+--------+--------+---------+--------------+---------+------------+
| examples1.address | 2 | 0.0% | 184.00b | 92.00b | 2 | 15.97K |
| examples1.system.indexes | 9 | 0.0% | 912.00b | 101.33b | 0 | 0.00b |
| examples1.typeless_address | 2 | 0.0% | 216.00b | 108.00b | 1 | 7.98K |
| examples2.system.indexes | 2 | 0.0% | 164.00b | 82.00b | 0 | 0.00b |
| examples1.typeless_user | 101879 | 26.7% | 10.10M | 104.00b | 3 | 8.18M |
| examples1.user | 101879 | 36.0% | 13.60M | 140.00b | 3 | 15.20M |
| examples2.things | 100000 | 37.3% | 14.11M | 148.00b | 2 | 5.67M |
+----------------------------+--------+--------+---------+--------------+---------+------------+
Total Documents: 303773
Total Data Size: 37.82M
Total Index Size: 29.08M
RAM Headroom: 2.87G
RAM Used: 2.74G (61.6%)
Available RAM Headroom: 1.10G
index-stats.py(인덱스 통계)
$ ./index-stats.py
Checking DB: examples2.system.indexes
Checking DB: examples2.things
Checking DB: examples1.system.indexes
Checking DB: examples1.address
Checking DB: examples1.typeless_address
Checking DB: examples1.user
Checking DB: examples1.typeless_user
Index Overview
+----------------------------+------------------------+--------+------------+
| Collection | Index | % Size | Index Size |
+----------------------------+------------------------+--------+------------+
| examples1.address | _id_ | 0.0% | 7.98K |
| examples1.address | _types_1 | 0.0% | 7.98K |
| examples1.typeless_address | _id_ | 0.0% | 7.98K |
| examples1.typeless_user | _id_ | 10.9% | 3.17M |
| examples1.typeless_user | address_id_1 | 10.9% | 3.17M |
| examples1.typeless_user | typeless_address_ref_1 | 6.4% | 1.85M |
| examples1.user | _id_ | 10.9% | 3.17M |
| examples1.user | _types_1_address_id_1 | 13.2% | 3.84M |
| examples1.user | _types_1_address_ref_1 | 28.2% | 8.20M |
| examples2.things | _id_ | 10.7% | 3.11M |
| examples2.things | _types_1 | 8.8% | 2.56M |
+----------------------------+------------------------+--------+------------+
Top 5 Largest Indexes
+-------------------------+------------------------+--------+------------+
| Collection | Index | % Size | Index Size |
+-------------------------+------------------------+--------+------------+
| examples1.user | _types_1_address_ref_1 | 28.2% | 8.20M |
| examples1.user | _types_1_address_id_1 | 13.2% | 3.84M |
| examples1.typeless_user | _id_ | 10.9% | 3.17M |
| examples2.things | _id_ | 10.7% | 3.11M |
| examples2.things | _types_1 | 8.8% | 2.56M |
+-------------------------+------------------------+--------+------------+
Total Documents: 303773
Total Data Size: 37.82M
Total Index Size: 29.08M
RAM Headroom: 2.87G
RAM Used: 2.73G (61.4%) -- 메모리 사용 비율까지.ㅋㅋ
Available RAM Headroom: 1.11G
'Etc' 카테고리의 다른 글
여러개 로그 파일이 좋을까??? (0) | 2012.09.25 |
---|---|
Spanner: Google’s Globally-Distributed Database (1) | 2012.09.17 |
제 2회 mongodb tech semina 참석 후기 (0) | 2012.09.13 |
MongoDB + Hadoop (0) | 2012.09.11 |
sql agent에 할당된 max worker thread 수는 얼마일까? (0) | 2012.09.10 |