'Etc' 카테고리의 다른 글
Redis - Windows 설치하기 (2) | 2012.06.07 |
---|---|
MySQL을 대체한 RDBMS F1 (1) | 2012.06.01 |
log rotate 처리하기 - window os (0) | 2012.05.29 |
[펌] Global Lock, MongoDB 2.0 vs 2.2 (0) | 2012.05.25 |
해외 NoSQL 관련 JOB 수요 (0) | 2012.05.23 |
'몽고db'에 해당되는 글 9건
Redis - Windows 설치하기 (2) | 2012.06.07 |
---|---|
MySQL을 대체한 RDBMS F1 (1) | 2012.06.01 |
log rotate 처리하기 - window os (0) | 2012.05.29 |
[펌] Global Lock, MongoDB 2.0 vs 2.2 (0) | 2012.05.25 |
해외 NoSQL 관련 JOB 수요 (0) | 2012.05.23 |
안녕하세요. 주디아줌마입니다.
몽고DB의 경우 따로 로그를 비워내지 않으면 로그 파일이 무한정 커지게 됩니다. Windows 환경의 경우 Shell명령을 2.0.3 이후 버젼부터 지원됩니다. 자동으로 rotate되면 좋을 텐데 아직 지원이 안되네요.
http://www.mongodb.org/display/DOCS/Logging
The logRotate command is available on Windows in version 2.0.3 and higher
> use admin
switched to db admin
> db.runCommand({logRotate: 1});
{ "ok" : 1 }
MySQL을 대체한 RDBMS F1 (1) | 2012.06.01 |
---|---|
스터디 발표 자료 - 관리와 배포 (0) | 2012.05.30 |
[펌] Global Lock, MongoDB 2.0 vs 2.2 (0) | 2012.05.25 |
해외 NoSQL 관련 JOB 수요 (0) | 2012.05.23 |
ipv6에 대해 고려중이신가요? (0) | 2012.05.17 |
charsysm;s 블로그
http://charsyam.wordpress.com/2012/05/24/%EB%B0%9C-%EB%B2%88%EC%97%AD-%EC%9E%98%EA%B0%80-global-lock-mongodb-2-0-vs-2-2/
몽고DB 2.2 Release Note
http://www.mongodb.org/display/DOCS/2.2+Release+Notes
몽고DB 2.2 중요 이슈
1. Global lock 의 제거
2. 데이타베이스 수준까지의 락 제어. (데이터베이스 lock을 collectiion 수준의 lock으로 변경되겠지요?...) (점점 다른 dbms에 지원되는 lock까지.ㅋㅋ)
개선 부분
global reader/writer lock 의 제거 – 첫 시도로 database level lock
PageFaultException 구조 – page fault 시에 Lock 양보.
점점 더 개선되는 모습들이 보입니다. ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ
charsysm's님의 블로그에서 확인하세요^^.
스터디 발표 자료 - 관리와 배포 (0) | 2012.05.30 |
---|---|
log rotate 처리하기 - window os (0) | 2012.05.29 |
해외 NoSQL 관련 JOB 수요 (0) | 2012.05.23 |
ipv6에 대해 고려중이신가요? (0) | 2012.05.17 |
SQL 책 추천(강력 추천) (0) | 2012.05.16 |
해외 job trend에요. 몽고DB가 1등.. 흠훼훼^^
참고 사이트
http://www.redmonk.com/jgovernor/2012/05/11/nosql-jobs-market-gets-real-mongo-exploding/
MongoDB, Redis, Cassandra, CouchDB,HBase Job Trends | Mongodb jobs - Redis jobs - Cassandra jobs - Couchdb jobs - Hbase jobs |
log rotate 처리하기 - window os (0) | 2012.05.29 |
---|---|
[펌] Global Lock, MongoDB 2.0 vs 2.2 (0) | 2012.05.25 |
ipv6에 대해 고려중이신가요? (0) | 2012.05.17 |
SQL 책 추천(강력 추천) (0) | 2012.05.16 |
몽고DB 책 소개 (0) | 2012.05.16 |
얼마전에 출간된 몽고DB 번역서입니다. 책을 사서 읽고있지만 정말 깊이 있는 내용을 가지고 있네요. 특히, 인덱스 부분 최적화 부분에 잘 설명되어 있습니다.
http://kangcom.com/sub/view.asp?topid=1&sku=201204060003
ipv6에 대해 고려중이신가요? (0) | 2012.05.17 |
---|---|
SQL 책 추천(강력 추천) (0) | 2012.05.16 |
DB 개체 스크립트 하기 (0) | 2012.04.25 |
몽고DB Replicated Shard Cluster + Arbitor (0) | 2012.03.19 |
몽고DB 활용 사례 (0) | 2012.03.19 |
D:\DB\MONGO> mkdir firstset1 , firstset2, firstarbiter
D:\DB\MONGO> mkdir secondset1, secondset2, secondarbiter
D:\DB\MONGO> mkdir thirdset1, thirdset2, thirdarbiter
D:\DB\MONGO> mkdir config1,
config2, config3
mongod --dbpath D:\DB\MONGO\firstset1 --port 10001 --replSet firstset --oplogSize 700 --rest
mongod --dbpath D:\DB\MONGO\firstset2 --port 10002 --replSet firstset --oplogSize 700 --rest
mongod --dbpath D:\DB\MONGO\firstarbiter --port 10003 --replSet firstset --oplogSize 700 --rest
C:\>mongo localhost:10001/admin
MongoDB shell version: 2.0.2
connecting to: localhost:10001/admin
>
db.runCommand({"replSetInitiate" : {"_id" : "firstset", "members" : [{"_id" : 1, "host" : "localhost:10001"}, {"_id" : 2, "host" : "localhost:10002"}, {"_id" : 3, "host" : "localhost:10003", arbiterOnly: true }]}})
PRIMARY> use test
switched to db test
PRIMARY> for(var i=0; i<1000000; i++){
name = people[Math.floor(Math.random()*people.length)];
user_id = i;
boolean = [true, false][Math.floor(Math.random()*2)];
added_at = new Date();
number = Math.floor(Math.random()*10001);
db.test_collection.save({"name":name, "user_id":user_id, "boolean": boolean, "added_at":added_at, "number":number });
}
mongod --configsvr --dbpath D:\DB\MONGO\config1 --port 20001
mongod --configsvr --dbpath D:\DB\MONGO\config2 --port 20002
mongod --configsvr --dbpath D:\DB\MONGO\config3 --port 20003
mongos --configdb localhost:20001,localhost:20002,localhost:20003 --port 27018 --chunkSize 1
D:\DB\MONGO>mongo localhost:27018/admin
MongoDB shell version: 2.0.2
connecting to: localhost:27018/admin
mongos> db.runCommand( { addshard : "firstset/localhost:10001,localhost:10002,localhost:10003" } )
{ "shardAdded" : "firstset", "ok" : 1 }
mongos>
mongod --dbpath D:\DB\MONGO\secondset1 --port 10004 --replSet secondset --oplogSize 700 --rest
mongod --dbpath D:\DB\MONGO\secondset2 --port 10005 --replSet secondset --oplogSize 700 --rest
mongod --dbpath D:\DB\MONGO\secondarbiter --port 10006 --replSet secondset --oplogSize 700 --rest
mongo localhost:10004/admin
db.runCommand({"replSetInitiate" : {"_id" : "secondset", "members" : [{"_id" : 1, "host" : "localhost:10004"}, {"_id" : 2, "host" : "localhost:10005"}, {"_id" : 3, "host" : "localhost:10006", arbiterOnly: true}]}})
mongo localhost:27018/admin
db.runCommand( { addshard : "secondset/localhost:10004,localhost:10005,localhost:10006" } )
db.runCommand({listshards:1})
mongod --dbpath D:\DB\MONGO\thirdset1 --port 10007 --replSet thirdset --oplogSize 700 --rest
mongod --dbpath D:\DB\MONGO\thirdset2 --port 10008 --replSet thirdset --oplogSize 700 --rest
mongod --dbpath D:\DB\MONGO\thirdarbiter --port 10009 --replSet thirdset --oplogSize 700 --rest
mongo localhost:10007/admin
db.runCommand({"replSetInitiate" : {"_id" : "thirdset", "members" : [{"_id" : 1, "host" : "localhost:10007"}, {"_id" : 2, "host" : "localhost:10008"}, {"_id" : 3, "host" : "localhost:10009", arbiterOnly: true }]}})
mongo localhost:27018/admin
db.runCommand( { addshard : "thirdset/localhost:10007,localhost:10008,localhost:10009" } )
db.runCommand({listshards:1})
mongo localhost:27018/admin
mongos> use admin
switched to db admin
mongos> show dbs;
config 0.0625GB
test 0.203125GB
mongos> db.runCommand( { enablesharding : "test" } )
{ "ok" : 1 }
use test
db.test_collection.ensureIndex({number:1})
use admin
-- test.test_collection의 number를 키 설정
db.runCommand( { shardcollection : "test.test_collection", key : {"number":1} })
use test
db.stats()
db.printShardingStatus()
몽고DB 책 소개 (0) | 2012.05.16 |
---|---|
DB 개체 스크립트 하기 (0) | 2012.04.25 |
몽고DB 활용 사례 (0) | 2012.03.19 |
몽고DB Sharding 설정 및 테스트 (16) | 2012.02.29 |
SQL 설치 유용한 스크립트 (0) | 2012.02.24 |
DB 개체 스크립트 하기 (0) | 2012.04.25 |
---|---|
몽고DB Replicated Shard Cluster + Arbitor (0) | 2012.03.19 |
몽고DB Sharding 설정 및 테스트 (16) | 2012.02.29 |
SQL 설치 유용한 스크립트 (0) | 2012.02.24 |
journal 폴더가 왜 생기는 걸까? (0) | 2012.02.21 |
D:\DB\MONGO>mkdir SHARD1, SHARD2, CONFIG
D:\DB\MONGO>mongod --dbpath D:\DB\MONGO\CONFIG --port 20000
D:\DB\MONGO>mongos --port 30000 --configdb localhost:20000
D:\DB\MONGO>mongod --dbpath D:\DB\MONGO\SHARD1 --port 10000
D:\DB\MONGO>mongod --dbpath D:\DB\MONGO\SHARD2 --port 10001
C:\Users\judydba>mongo localhost:30000/admin
MongoDB shell version: 2.0.2
connecting to: localhost:30000/admin
mongos> db.runCommand( {addshard : "localhost:10000", allowLocal:true})
{ "shardAdded" : "shard0000", "ok" : 1 }
mongos> db.runCommand( {addshard : "localhost:10001", allowLocal:true})
{ "shardAdded" : "shard0001", "ok" : 1 }
mongos> db.runCommand({ "enablesharding" : "testdb" })
{ "ok" : 1 }
mongos> db.runCommand({ "shardcollection" : "testdb.test", "key" : {"seq" : 1}})
{ "collectionsharded" : "testdb.test", "ok" : 1 }
mongos> use config
switched to db config
mongos> db.shards.find();
{ "_id" : "shard0000", "host" : "localhost:10000" }
{ "_id" : "shard0001", "host" : "localhost:10001" }
mongos> db.databases.find()
{ "_id" : "admin", "partitioned" : false, "primary" : "config" }
{ "_id" : "testdb", "partitioned" : true, "primary" : "shard0000" }
mongos> db.chunks.find()
{ "_id" : "testdb.test-seq_MinKey", "lastmod" : { "t" : 1000, "i" : 0 }, "ns" :
"testdb.test", "min" : { "seq" : { $minKey : 1 } }, "max" : { "seq" : { $maxKey
: 1 } }, "shard" : "shard0000" }
mongos> db.printShardingStatus()
--- Sharding Status ---
sharding version: { "_id" : 1, "version" : 3 }
shards:
{ "_id" : "shard0000", "host" : "localhost:10000" }
{ "_id" : "shard0001", "host" : "localhost:10001" }
databases:
{ "_id" : "admin", "partitioned" : false, "primary" : "config" }
{ "_id" : "testdb", "partitioned" : true, "primary" : "shard0000" }
testdb.test chunks:
shard0000 1
{ "seq" : { $minKey : 1 } } -->> { "seq" : { $maxKey : 1
} } on : shard0000 { "t" : 1000, "i" : 0 }
mongos> use testdb
switched to db testdb
mongos> for(i=0; i<500000; i++) { db.test.insert({"_id" : i, "seq" : i+5000, "date": new Date() }); }
mongos> use config
switched to db config
mongos> db.chunks.find()
{ "_id" : "testdb.test-seq_MinKey", "lastmod" : { "t" : 2000, "i" : 1 }, "ns" :
"testdb.test", "min" : { "seq" : { $minKey : 1 } }, "max" : { "seq" : 5000 }, "s
hard" : "shard0000" }
{ "_id" : "testdb.test-seq_5000.0", "lastmod" : { "t" : 1000, "i" : 3 }, "ns" :
"testdb.test", "min" : { "seq" : 5000 }, "max" : { "seq" : 17024 }, "shard" : "s
hard0000" }
{ "_id" : "testdb.test-seq_17024.0", "lastmod" : { "t" : 2000, "i" : 2 }, "ns" :
"testdb.test", "min" : { "seq" : 17024 }, "max" : { "seq" : 419135 }, "shard" :
"shard0001" }
{ "_id" : "testdb.test-seq_419135.0", "lastmod" : { "t" : 2000, "i" : 3 }, "ns"
: "testdb.test", "min" : { "seq" : 419135 }, "max" : { "seq" : { $maxKey : 1 } }
, "shard" : "shard0001" }
mongos> db.printShardingStatus()
--- Sharding Status ---
sharding version: { "_id" : 1, "version" : 3 }
shards:
{ "_id" : "shard0000", "host" : "localhost:10000" }
{ "_id" : "shard0001", "host" : "localhost:10001" }
databases:
{ "_id" : "admin", "partitioned" : false, "primary" : "config" }
{ "_id" : "testdb", "partitioned" : true, "primary" : "shard0000" }
testdb.test chunks:
shard0000 2
shard0001 2
{ "seq" : { $minKey : 1 } } -->> { "seq" : 5000 } on : s
hard0000 { "t" : 2000, "i" : 1 }
{ "seq" : 5000 } -->> { "seq" : 17024 } on : shard0000 {
"t" : 1000, "i" : 3 }
{ "seq" : 17024 } -->> { "seq" : 419135 } on : shard0001
{ "t" : 2000, "i" : 2 }
{ "seq" : 419135 } -->> { "seq" : { $maxKey : 1 } } on :
shard0001 { "t" : 2000, "i" : 3 }
몽고DB Replicated Shard Cluster + Arbitor (0) | 2012.03.19 |
---|---|
몽고DB 활용 사례 (0) | 2012.03.19 |
SQL 설치 유용한 스크립트 (0) | 2012.02.24 |
journal 폴더가 왜 생기는 걸까? (0) | 2012.02.21 |
몽고DB Config 설정하기(Win7) (0) | 2012.02.20 |
dbpath = /mdb
bind_ip = 127.0.0.1
port = 5586
logpath = C:\mongodb\log\log.txt ## 로그 경로
noauth = true # use 'true' for options that don't take an argument
verbose = true # to disable, comment out.
SQL 설치 유용한 스크립트 (0) | 2012.02.24 |
---|---|
journal 폴더가 왜 생기는 걸까? (0) | 2012.02.21 |
몽고DB 책 소개 (0) | 2012.02.17 |
몽고DB 어드민 관리툴 (1) | 2011.08.18 |
SQL to Mongo Mapping Chart (0) | 2011.08.18 |