Issei Naruta @mirakui mongodbããã£ã¹ã¯å®¹éã空ããããã« db.repairDatabase() ããããã£ã¹ã¯å®¹éã足ããªãã£ã¦è¨ãããããæãè²·ãã«è¡ãæãç¡ãç¶æ ã«ãªã 2012-10-16 18:52:59
RDBMSã®å ´å SELECT * FROM userlog WHERE timestamp BETWEEN '2011-11-01' AND '2011-11-02' ORDER BY timestamp; Mongo Shellã®å ´å var query = { "timestamp" : { "$gte" : ISODate("2011-11-01T00:00:00+09:00"), "$lte" : ISODate("2011-11-02T00:00:00+09:00") } }; db.userlog.find(query).sort({timestamp:1}); å¢çå¤ãå«ã¿ãããªãå ´åã¯ã"$gt","$lt"ã¨æ¸ãã¾ãã var query = { "timestamp" : { "$gt" : ISODate("2011-11-01T00:00:00+09:00"),
ããæ¹ æ®éã«ãã³ããã¦ãªã¹ãã¢ããã ãã§ã(mongodumpãã¦mongorestore)ã mongorestoreã¯æ®éã«ä½¿ãã¨ã追è¨ããè¡ãããã®ã§ããã®ã±ã¼ã¹ã«ã¯ãã£ã¦ããã§ãã æºå ä½æ¥ãã¹ãæãã®ã§ãäºåã«ä¸¡æ¹ã®ãã¼ã¿ãããã¯ã¢ãããã¦ããã¾ãã ãµã¼ãA㧠mongodump --db newdb --out /tmp/mongodump ããããã¨bsonãã¡ã¤ã«ãåºåããã¾ãã /tmp/mongodump/newdb/userlog.bson /tmp/mongodump/newdb/system.indexes.bson ãã³ããã¼ã¿ã転é rsync -avz /tmp/mongodump hostB:/tmp/ ãµã¼ãB㧠sudo /etc/init.d/mongod stop # ãã¼ã¢ã³ãæ¢ãã¦ãã sudo mongorestore --dbpath
http://www.mongodb.org/ MongoDBã¯ãé«ããã©ã¼ãã³ã¹ãã¹ãã¼ãã¬ã¹ããªã¼ãã³ã½ã¼ã¹ã®ããã¥ã¡ã³ãæåãã¼ã¿ãã¼ã¹ã§ãããC++è¨èªã§è¨è¿°ããã¦ãããMongoDBã¯ãBSONã¨ããJSONã®ãã¤ããªçã®ãããªå½¢å¼ã§ããã¥ã¡ã³ãã表ç¾ããã³ã¬ã¯ã·ã§ã³ã¨ãã¦ç®¡çããããã®å½¢å¼ã¯è¤éãªé層ãæããããã¨ãã§ãããã¤ã¯ã¨ãªãã¤ã³ããã¯ã¹ã容æã§ãããããã«ããå¤ãã®ã¢ããªã±ã¼ã·ã§ã³ã¯èªèº«ã®ãã¤ãã£ããªãã¼ã¿åãæ§é ã«åã£ãèªç¶ãªæ¹æ³ã§ãã¼ã¿ãæ ¼ç´ã§ããã æè¿ãæ¥åã§ä½¿ããã¨ãå¤ããªã£ã¦ããMongoDBãOracleãMySQLã¨ãã£ãRDBã¨éã£ã¦ãè¤éãªãã¼ã¿ãé層ã§è¡¨ããã¨ãã§ããã®ãç¹å¾´ãã¾ãRDBã«ã¯åºæ¬çã«åãã£ã¦ãããã©ã³ã¶ã¯ã·ã§ã³ã¯çããã¦ãããããã¼ã¿ã®ä¿¡é ¼æ§ã¯ä½ããªãããããã©ã¼ãã³ã¹ã¯é常ã«é«ãã¨ãããã ãã¼ã¿ãã¼ã¹ã®æä½ã«ããã¦åºæ¬ä¸ã®åºæ¬
Index RealTimeAccesséè¨ Capped Collection Tailable Cursor ã¾ã¨ã RealTimeAccesséè¨ RealTimeAccesséè¨ãããããã«MongoDBã®å©ç¨ãèãã¾ãããµã¼ãã¼ã®æ§æã¯ä¸å³ã®ãããªã¤ã¡ã¼ã¸ã§å種ApplicationServerããFluentdã§LogAggregatorã«RealTimeã§Logãã¼ã¿ã転éããLogAggregator MasterãMongoDBã«Fluentdã§æ¸ãè¾¼ãã§è¡ãã¾ããããã§è¨ãRealTimeAccesséè¨ã®æ©è½è¦ä»¶ãæ´çããã¨ä»¥ä¸ã®ããã«ãªãã¾ãã Accessçºçå¾ã1å以å ã§éè¨çµæãWebãã¼ã«ä¸ã§ç¢ºèªããããéè¨åºéã1ååä½ãªã©ã è¤æ°æ¡ä»¶ãæå®å¯è½ã§ãæè»ãªCrosséè¨ããããã RealTimeAccesséè¨ã®Systemè² è·ãåºæ¥ãéãæãããã
ã¯ããã« ååããMongoDBã®éæ©è½é¢ã«çç®ãã¦ãã¾ãããä»åã¯MongoDBã®ç£è¦ã«ã¤ãã¦èª¬æãã¾ããã¾ããMongoDBã®ç£è¦ã§ä½¿ããã¨ãã§ããæ©è½ããã¼ã«ãç´¹ä»ãããã®å¾ããããã®ãã¼ã«ãç¨ãã¦ã©ã®ããã«MongoDBãç£è¦ãããã«ã¤ãã¦ä¸è¬çãªèãæ¹ãç´¹ä»ãã¾ããMongoDBã¯ææ°ãã¼ã¸ã§ã³ã®2.4ã対象ã¨ãã¦ãã¾ãã ã³ãã³ã表è¨ã«ã¤ãã¦$ ï¼ ã³ãã³ãã©ã¤ã³ã§å®è¡ããã³ãã³ã ç£è¦æ©è½ã®ç´¹ä» ãã®ã³ã° æåã«ç£è¦ã®åºæ¬ã¨ããããããã®ã³ã°ã«ã¤ãã¦èª¬æãã¾ããMongoDBã§ã¯ä½ãæå®ããªãã¨æ¨æºåºåã«ãã°ãåºåããã¾ããããã¡ã¤ã«ã«åºåããå ´åã¯ã --logpath ããªãã·ã§ã³ã«ã¦ãã°ã®åºåå ãæå®ãã¾ãã $ mongod --logpath=/var/log/mongodb.log ãã®ã¾ã¾ã ã¨ã次åèµ·åæã«ãã°ã¯ãã¼ãã¼ã·ã§ã³ããã¦ãã¾ãã¾ãããã°ããã¼ãã¼ã·ã§
@doryokujinã§ããä»æ¥ãç¸å¤ãããMongoDBã®ãããã¦Shardingã«é¢ããè¨äºãæ¸ããã¨æãã¾ãã â¦ã¨ããã®åã«ãç¥ããã§ãï¼6æã¯2ã¤ã®MongoDBåå¼·ä¼ãäºå®ãã¦ããã¾ããæ¯éãåå ä¸ããï¼ ã»2011å¹´6æ11æ¥ï¼åï¼ ã第4å MongoDB åå¼·ä¼ in Tokyoã@ãã¥ã¼ãã£ã¼ã¢ã¼ããã¯ã ã»2011å¹´6æ28æ¥ï¼ç«ï¼ã第1å MongoDB ã½ã¼ã¹ã³ã¼ããªã¼ãã£ã³ã°ã@PFI ãã¦ãããã§ã¯æ¬é¡ã«å ¥ãããã¨æãã¾ãã MongoDBã®Shardingã¨ããã°ã ã»åæè¨å®ãShardã®è¿½å ã»åé¤ã¨ãã£ãå°å ¥ã®å®¹æã ã»Shardã®é¢åãMongoå´ããã£ã¨è¦ã¦ãããã¨ãã管çã®å®¹æã ãåãã¦ããã¨è¨ããã¨ã§èå³ãæã£ã¦ããããæ¹ãå¤æ°ããã¨æãã¾ãã ããããã®ä¸æ¹ã§å®éã«Shardingç°å¢ãå°å ¥ãã¦ããæ¹ã ã®ä¸ã®å¤ãã¯ãééããæ§ã ãªä¸é½åãä¸æ´
NUMAï¼è±: Non-Uniform Memory Accessï¼ã¨ã¯ãå ±æã¡ã¢ãªåãã«ãããã»ããµã³ã³ãã¥ã¼ã¿ã·ã¹ãã ã®ã¢ã¼ããã¯ãã£ã®ã²ã¨ã¤ã§ãè¤æ°ããã»ããµãå ±æããã¡ã¤ã³ã¡ã¢ãªã¸ã®ã¢ã¯ã»ã¹ã³ã¹ãããã¡ã¢ãªé åã¨ããã»ããµã«ä¾åãã¦åä¸ã§ãªãã¢ã¼ããã¯ãã£ã§ãããæ¥æ¬èªã§ã¯ãä¸åä¸ã¡ã¢ãªã¢ã¯ã»ã¹ãããä¸åçã¡ã¢ãªã¢ã¯ã»ã¹ãã¨è¨³ããã[1][2]ã ããã»ããµã¨ã¡ã¢ãªã®å¯¾ï¼ããããã¼ãã¨å¼ã¶ï¼ãè¤æ°åå¨ããããããã¤ã³ã¿ã¼ã³ãã¯ãï¼ãã®è©³ç´°ã¯åããªãï¼ã§æ¥ç¶ãããã®ãå¦è¡çã«ã¯NUMAã®å®ç¾©ã¨ãã¦ããããã ãå ±æã¡ã¢ãªåã§ããã®ã§åããã»ããµãå ¨ãã¼ãã®ã¡ã¢ãªãå©ç¨å¯è½ã§ããå¿ è¦ããããåãã¼ãã®ã¡ã¢ãªãå ¨ããã»ããµã«å ±éã®ç©çã¢ãã¬ã¹ç©ºéã«ãããã§ãããã¨ãè¦ä»¶ã¨ãªããããããã»ããµããè¦ã¦åä¸ãã¼ãã®ã¡ã¢ãªãããã¼ã«ã«ãã¡ã¢ãªãä»ãã¼ãã®ã¡ã¢ãªãããªã¢ã¼ããã¡ã¢ãªã¨å¼ã¶ã ä¸è¬ç
This page details system configurations that affect MongoDB, especially when running in production. MongoDB Atlas is a cloud-hosted database-as-a-service. MongoDB Cloud Manager, a hosted service, and Ops Manager, an on-premise solution, provide monitoring, backup, and automation of MongoDB instances. For documentation, see Atlas documentation, the MongoDB Cloud Manager documentation and Ops Manage
ãã¥ã¢ã«CPUã§è¨12ã³ã¢24ã¹ã¬ãããã¡ã¢ãª48GBã¨ãããã·ã³ã§ MongoDB-2.0.8 ããã°ãã稼åãããã¨ãããçªç¶ CPU ã® system time ã1ã³ã¢åæ´èµ°ããããã«ãªããã¨ããç¾è±¡ãèµ·ãã¾ããã æåã¯åå ãããåããããã¨ãããã mongod ã®ããã»ã¹ã kill ãã¦èµ·åãç´ããã復æ§ããã®ã§ãããã¾ããã°ããããã¨åãç¾è±¡ã«ã mongoã®ã¡ã¢ãªä½¿ç¨é㨠Load Average ããããããã¦ã¿ãã¨ãã©ããããç¨åº¦ (ç´24GB?) ã®ã¡ã¢ãªã使ã£ãã¨ããã§æ´èµ°ãèµ·ãã¦ãããããªâ¦â¦ã¨ãã°ãè¦ç´ãã¦ã¿ãã¨ãèµ·åæã« WARNING ãã§ã¦ãã¾ããã Sun Jan 20 00:10:01 [initandlisten] MongoDB starting : pid=12669 port=27017 dbpath=/var/lib/mongo 64-b
ã¾ãã¯ï¼rubyã§ãã°ãåãã¦ãã®ãã°ãfluentdã§æ¾ã£ã¦ã¿ãï¼ ãã®å¾ï¼mongoDBã«ä¿åããæ¹æ³ãæ¸ãï¼ æºå bundlerã使ã£ã¦ç®¡çããã®ã§ä»¥ä¸ãå®è¡ï¼ $ mkdir sample $ cd sample $ bundle init bundle initã§ä½æããã./Gemfileã«ä»¥ä¸ã追å ï¼ gem 'fluentd' gem 'fluent-logger' gem 'fluent-plugin-mongo' gem 'bson_ext' ãã®å¾$ bundle insall --path vendor/bundleããï¼ fluentdã®è¨å®ãã¡ã¤ã«ãä½ã # ã«ã¬ã³ããã£ã¬ã¯ããªã«è¨å®ãã¡ã¤ã«ä½æ $ bundle exec fluentd --setup ./fluent ./fluent/fluent.confã«ä»¥ä¸ã®è¨å®ã追å ï¼ portã8082ã§fl
The page has timed out If this page does not reload automatically, please refresh your browser.
ä¹ ã ã®æ´æ°ã§ããMongoDBã®ããã¥ã¡ã³ãã®Replicationã®é¨åã®è¨³ãä¸å¿å®äºãã¾ããã®ã§ãããã«åããã¦ãã®ããã°ã§ãReplicationæ©è½ã«ã¤ãã¦æ¸ãã¦ããããã¨æãã¾ããã¾ã 解éã®çãé¨åãæ®ã£ã¦ãã¾ãã®ã§ãä»å¾ããã®é¨åã®åå¼·ãç¶ãä¿®æ£ãè¡ã£ã¦ããã¾ããã¾ããå¼ãç¶ãAdmin Zoneã®è¨³ãé²ãã¦ããã¤ããã§ãã æ¬æ¥ã®ã¢ã¸ã§ã³ãã§ãï¼ MongoDBã®Replicationæ©è½ã«ã¤ã㦠Master/Slave Replica pair Replica set MongoDBã®ããã¯ã¢ããæ©è½ã«ã¤ã㦠ãã¡ã¤ã«ã®ããã¯ã¢ãã mongodumpã«ããã¨ã¯ã¹ãã¼ã MongoDBã®Replicationæ©è½ã«ã¤ã㦠MongoDBã®Replicationã¯ç´°ããåããã¨3種é¡ããã¾ãã Master/Slave å ¸åçãªMasterã¨Slaveã®æ§æã§ããMaste
æ社ã¨ã®åååå¼·ä¼ã®LTã§çºè¡¨ããMongoDBãåå¹´éç¨ãã¦ã¿ããããããã¯ã¦ãããã¦ã¦ã³ã£ããããããã®ã¾ã¾ã ã¨MongoDBã¯çµ¶å¯¾ä½¿ããªãã£ã¦çµè«ã«ãªã£ã¡ãããããªã®ã§ãèªåããã©ãã¼ããå½¢ã§ã¨ã³ããªãæ¸ãããã¨æãã¾ãã è³æã¯ãã¡ãã Mongo DBãåå¹´éç¨ãã¦ã¿ã View more presentations from Masakazu Matsushita ã³ãã¯ã·ã§ã³ã¨ã©ã¼å¤çº ããã¯ã7æã«mongosã®å ´æãmongodããSocketãµã¼ãï¼Webãµã¼ãï¼ç®¡çãµã¼ãã«ç§»åãã件ã¨é¢ä¿ãã¦ãã¾ãã ã¾ããSocketãµã¼ãï¼Webãµã¼ãï¼ç®¡çãµã¼ãã¨ãã«Javaã§å®è£ ããã¦ããã®ã§ãMongoDBã¸ã®æ¥ç¶ã¯Javaã®å ¬å¼ãã©ã¤ãã¼ãå©ç¨ãã¦ãã¾ããå½åã®ãã©ã¤ãã¼ã®å©ç¨æ¹æ³ã¯ã // Shard1, Shard2, Shard3ã®PRIMARYã¨åå± ãã¦ãmong
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}