我们在第一次使用mongodb时遇到问题:)以下是一些事实:
---- total-cpu-usage ---- -dsk/total- -net/total- --- paging-- --- system--
usr sys idl wai hiq siq |阅读命令|接收发送|进出内置csw
46 1 53 0 0 0 | 0 4096B | 42k 19k | 0 0 | 317 5328
48 1 52 0 0 1 | 0 92k | 46k 7590B | 0 0 | 321 5308
50 2 48 0 0 0 | 0 0 | 39k 7218B | 0 0 | 304 5359
47 1 51 0 0 1 | 0 0 | 47k 10k | 0 0 | 332 5679
46 1 52 0 0 0 | 0 0 | 44k 15k | 0 0 | 319 5099
插入查询更新delete getgetmore命令刷新映射的vsize res错误已锁定%idx miss%qr | qw ar | aw netIn netOut conn repl time
0 0 0 0 0 1 0 1.41g 8.39g 242m 0 96.2 0 0 | 3280 1 | 5322 62b 1k 5324 M 21:11:50
0 0 0 0 0 1 0 1.41g 8.39g 242m 0 96.5 0 0 | 3204 1 | 5322 62b 1k 5324 M 21:11:51
0 0 0 0 0 1 0 1.41g 8.39g 242m 0 96 0 1 | 3351 1 | 5322 62b 1k 5324 M 21:11:52
0 0 1 0 0 1 0 1.41g 8.39g 242m 0 96.9 0 0 | 3251 1 | 5322 485b 1k 5324 M 21:11:53
0 0 0 0 1 1 0 1.41g 8.39g 242m 0 95.6 0 0 | 3280 1 | 5322 112b 1k 5324 M 21:11:54
{
“主机”:“foo001”,
“version”:“2.0.2”,
“process”:“mongod”,
“正常运行时间”:21370,
“uptimeEstimate”:18626,
“localTime”:ISODate(“2012-02-23T20:20:59.589Z”),
“globalLock”:{
“totalTime”:21369761258,
“lockTime”:19450568051,
“比率”:0.9101911722911022,
“currentQueue”:{
“总计”:3570,
“读者”:0,
“作家”:3570
},
“activeClients”:{
“总计”:5500,
“读者”:1
“作家”:5499
}
},
“mem”:{
“位数”:64,
“居民”:255,
“虚拟”:8782,
“支持”:是,
“映射”:1440,
“mappedWithJournal”:2880
},
“连接”:{
“当前”:5501,
“可用”:4099
},
“extra_info”:{
“note”:“字段因平台而异”,
“heap_usage_bytes”:81930736,
“page_faults”:2916
},
“indexCounters”:{
“btree”:{
“访问”:2377,
“点击数”:2377,
“未命中”:0,
“resets”:0,
“missRatio”:0
}
},
“backgroundFlushing”:{
“flushes”:356,
“total_ms”:2372,
“average_ms”:6.662921348314606,
“last_ms”:0,
“last_finished”:ISODate(“2012-02-23T20:20:56.446Z”)
},
“光标”:{
“totalOpen”:5500,
“clientCursors_size”:5500,
“timedOut”:0,
“totalNoTimeout”:5499
},
“网络”:{
“bytesIn”:51373772,
“bytesOut”:51176411,
“numRequests”:176017
},
“repl”:{
“ismaster”:true
},
“opcounters”:{
“插入”:0,
“查询”:25,
“更新”:142157,
“删除”:0,
“getmore”:39053,
“命令”:284
},
“断言”:{
“常规”:0,
“警告”:0,
“msg”:0,
“用户”:0,
“展期”:0
},
“writeBacksQueued”:false,
“dur”:{
“提交”:19,
“journaledMB”:0,
“writeToDataFilesMB”:0,
“压缩”:0,
“commitsInWriteLock”:0,
“earlyCommits”:0,
“timeMs”:{
“dt”:3083,
“prepLogBuffer”:0,
“writeToJournal”:0,
“writeToDataFiles”:0,
“remapPrivateView”:0
}
},
“好”:1
}
{
“db”:“mydb”,
“收藏”:6
“对象”:119174,
“avgObjSize”:323.99872455401345,
“dataSize”:38612224,
“storageSize”:57286656,
“numExtents”:26,
“索引”:4
“indexSize”:3899952,
“fileSize”:469762048,
“nsSizeMB”:16
“好”:1
}
有什么提示吗?
问候,
D.
PS:我也将其交叉发布给mongo用户
最佳答案
拜托,拜托,请不要将NFS用作数据库后端。有很多问题,尤其是与锁定有关,尤其是与NFS
我将从将数据库移动到本地磁盘开始,看看是否可以解决性能问题-我怀疑它将...
编辑:
MongoDB的人seem to agree,即使有些简洁,也不建议使用NFS。