MongoDB MongoIC 蛋疼的性能

suupic · 2012年03月09日 · 最后由 richarddong 回复于 2012年04月18日 · 5143 次阅读

盛大云主机+mongoic+production

Completed 200 OK in 4683ms (Views: 125.3ms | Mongo: 4556.3ms)
Completed 200 OK in 2789ms (Views: 52.6ms | Mongo: 2734.2ms)
Completed 200 OK in 2634ms (Views: 52.6ms | Mongo: 2578.7ms)
Completed 200 OK in 3220ms (Views: 122.8ms | Mongo: 3095.4ms)
Completed 200 OK in 3646ms (Views: 52.4ms | Mongo: 3591.4ms)
Completed 200 OK in 3983ms (Views: 95.7ms | Mongo: 3886.1ms)
Completed 200 OK in 1725ms (Views: 48.3ms | Mongo: 1674.5ms)
Completed 200 OK in 92ms (Views: 46.2ms | Mongo: 44.4ms)
Completed 200 OK in 2666ms (Views: 120.9ms | Mongo: 2543.4ms)
Completed 200 OK in 1222ms (Views: 48.3ms | Mongo: 1172.2ms)
Completed 200 OK in 2641ms (Views: 49.7ms | Mongo: 2589.5ms)
Completed 200 OK in 2645ms (Views: 402.2ms | Mongo: 2239.2ms)
Completed 200 OK in 5310ms (Views: 390.9ms | Mongo: 4915.9ms)
Completed 200 OK in 6857ms (Views: 123.6ms | Mongo: 6732.0ms)



开发用虚拟机(512MB)+mongodb+development

Completed 200 OK in 127ms (Views: 111.3ms | Mongo: 13.5ms)
Completed 200 OK in 207ms (Views: 125.6ms | Mongo: 71.9ms)
Completed 200 OK in 200ms (Views: 164.3ms | Mongo: 31.7ms)
Completed 200 OK in 150ms (Views: 135.9ms | Mongo: 13.3ms)
Completed 200 OK in 178ms (Views: 154.5ms | Mongo: 19.2ms)
Completed 200 OK in 190ms (Views: 169.4ms | Mongo: 17.5ms)
Completed 200 OK in 245ms (Views: 228.4ms | Mongo: 13.6ms)
Completed 200 OK in 170ms (Views: 150.5ms | Mongo: 15.4ms)



不理想阿。

是不是广域网访问的 mongoic,网络延时导致的?

#3 楼 @quakewang 云主机与 mongoic 应该算是内网吧?

#3 楼 @quakewang 不是网络的问题,网络连通性非常好

64 bytes from IPXX.XX.XX.XX: icmp_seq=2449 ttl=62 time=0.339 ms
64 bytes from IPXX.XX.XX.XX: icmp_seq=2450 ttl=62 time=0.320 ms
64 bytes from IPXX.XX.XX.XX: icmp_seq=2451 ttl=62 time=0.302 ms
64 bytes from IPXX.XX.XX.XX: icmp_seq=2452 ttl=62 time=0.314 ms
64 bytes from IPXX.XX.XX.XX: icmp_seq=2453 ttl=62 time=0.330 ms
64 bytes from IPXX.XX.XX.XX: icmp_seq=2454 ttl=62 time=0.305 ms
64 bytes from IPXX.XX.XX.XX: icmp_seq=2455 ttl=62 time=0.314 ms
64 bytes from IPXX.XX.XX.XX: icmp_seq=2456 ttl=62 time=0.333 ms
64 bytes from IPXX.XX.XX.XX: icmp_seq=2457 ttl=62 time=0.361 ms
64 bytes from IPXX.XX.XX.XX: icmp_seq=2458 ttl=62 time=0.318 ms
64 bytes from IPXX.XX.XX.XX: icmp_seq=2459 ttl=62 time=0.313 ms
64 bytes from IPXX.XX.XX.XX: icmp_seq=2460 ttl=62 time=0.306 ms
64 bytes from IPXX.XX.XX.XX: icmp_seq=2461 ttl=62 time=0.301 ms
64 bytes from IPXX.XX.XX.XX: icmp_seq=2462 ttl=62 time=0.411 ms
64 bytes from IPXX.XX.XX.XX: icmp_seq=2463 ttl=62 time=0.310 ms

--- mongoc2.grandcloud.cn ping statistics ---
2463 packets transmitted, 2463 received, 0% packet loss, time 2462343ms
rtt min/avg/max/mdev = 0.231/0.410/25.187/0.846 ms

超卖了?

在管理员指点下换了一台 db,这台 db 表现比较正常

Completed 200 OK in 617ms (Views: 399.2ms | Mongo: 138.2ms)
Completed 200 OK in 180ms (Views: 39.7ms | Mongo: 138.9ms)
Completed 200 OK in 525ms (Views: 310.6ms | Mongo: 211.3ms)
Completed 200 OK in 323ms (Views: 190.3ms | Mongo: 130.7ms)
Completed 200 OK in 340ms (Views: 161.9ms | Mongo: 141.0ms)
Completed 200 OK in 247ms (Views: 138.8ms | Mongo: 95.7ms)
Completed 200 OK in 180ms (Views: 39.4ms | Mongo: 139.0ms)
Completed 200 OK in 185ms (Views: 39.6ms | Mongo: 143.5ms)
Completed 200 OK in 242ms (Views: 101.0ms | Mongo: 138.7ms)
Completed 200 OK in 214ms (Views: 73.0ms | Mongo: 139.3ms)
Completed 200 OK in 323ms (Views: 181.5ms | Mongo: 139.5ms)
Completed 200 OK in 181ms (Views: 39.8ms | Mongo: 139.2ms)
Completed 200 OK in 347ms (Views: 206.6ms | Mongo: 139.0ms)

100 多也是不正常啊

还是差了一个数量级 ....

云主机,目前看来,还是扯淡级别上的。

匿名 #11 2012年03月20日

现在的性能还是这么残忍么?

@suupic 在另一个云主机上转一个自己的 mongodb 实例呢?会不会好一点?

需要 登录 后方可回复, 如果你还没有账号请 注册新账号