Home  >  Q&A  >  body text

java - 向mongoDB中插入数据时,cpu的system time很高是为什么?

1、向mongoDB中插入1亿条单条为1KB的数据
2、top一下

3、cpu的sy很高,从始至终一直居高不下,且sy和us加起来几乎把cpu资源耗尽
4、当前服务器只有mongodb在跑任务,所以cpu资源基本都是mongodb耗尽的
5、有没有大神了解这是什么情况,这是正常的吗???
6、急!!!在线等!!!!!

==========================================================================

插入时mongo状况:
1、mongostat

2、mongotop

3、日志很正常,未报错
4、mongodb版本是3.2.6

==========================================================================

CPU监控截图,100并发

迷茫迷茫2744 days ago783

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-04-18 10:49:40

    1. Use db.currentOp() to check the current operation;

    2. Check the mongod.log log to see if there are any other abnormalities;

    3. Use mongostat/mongotop to check the performance;

    4. Can you tell me the database version? If the WiredTiger storage engine is used and Compresion is turned on, Compression will also consume CPU resources.

    For reference.

    Love MongoDB! Have Fun!


    If you feel sad, just watch a comedy and drive around for more than 40 kilometers;

    Come back and play MongoDB after all your travels! :)

    Love MongoDB! Have Fun!

    reply
    0
  • Cancelreply