benchrun

> res = benchRun({
  ops:[{
       ns:"test.foo",
      op:"insert",
     doc:{y:{"#RAND_INT":[0,1000]}}
    }],
parallel:20,
seconds:1  
})

> print("20 thread insert/sec:" + res.insert);

mongostat

mongo bin中自带的一个工具。

db.serverStatus()

mongo推荐使用xfs文件系统会对性能有很大提升。(ext4自带loc,并发性能会下降。有时候会导致系统时快时慢)

mongo最好能够有独立硬盘。

相关文章:

  • 2021-06-08
  • 2021-11-23
  • 2021-07-20
  • 2021-06-19
  • 2021-08-26
  • 2021-09-27
  • 2022-12-23
  • 2021-11-29
猜你喜欢
  • 2021-12-13
  • 2022-01-22
  • 2022-12-23
  • 2021-08-04
  • 2022-12-23
  • 2021-12-23
  • 2022-01-01
相关资源
相似解决方案