mongodb cpu 超过100%居高不下的原因分析过程

-- mongodb cpu is high, infomation as below:   


1 the message in the http://10.100.1.11:28017/ as below:
conn 3188663  R   2004 apollo.eacmscache { key: "mpage:en_US:layout.www.origin.com/connect_default" } 10.100.10.114:37852

 

2 check top status,find the hightest process, the pid is 19271  
top - 02:56:01 up 830 days,  7:12,  3 users,  load average: 4.23, 3.68, 3.53
Tasks: 248 total,   1 running, 247 sleeping,   0 stopped,   0 zombie
Cpu(s):  6.7%us,  2.7%sy,  0.0%ni, 88.5%id,  1.3%wa,  0.1%hi,  0.7%si,  0.0%st
Mem:  49430528k total, 49291660k used,   138868k free,   231876k buffers
Swap: 33551744k total,  2134896k used, 31416848k free, 47219484k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                  
19271 root      15   0  387g 9.8g 9.6g S 140.2 20.7  48:49.53 mongod                                                                                                  
14551 root      15   0  480g  11g  11g S 15.9 24.4  18:21.43 mongod                                                                                                   

3 find the process name of pid 19271
[root@346437-eastore_db1 ~]# ps -eaf|grep mongo
root     14551     1 31 01:59 ?        00:19:19 /db/mongodb/bin/mongod -f /etc/mongodb/27017.conf
root     14558     1  1 01:59 ?        00:00:50 /db/mongodb/bin/mongod -f /etc/mongodb/27019.conf
root     17742 21933  0 03:00 pts/2    00:00:00 grep mongo
root     19271     1 87 02:00 ?        00:53:24 /db/mongodb/bin/mongod -f /etc/mongodb/27018.conf
root     23465  4278  0 01:38 ?        00:00:00 sshd: mongo [priv]
mongo    25215 23465  0 01:40 ?        00:00:00 sshd: mongo@pts/1
mongo    25219 25215  0 01:40 pts/1    00:00:00 -bash
  it is /db/mongodb/bin/mongod -f /etc/mongodb/27018.conf

4 see the log
find the log directory in /etc/mongodb/27018.conf, it is ok, nothing error infomation.

5, see the message in http://10.100.1.11:28017/ again
there are many info about: apollo.eacmscache { key: "mpage:en_US:layout.www.origin.com/connect_default" }
check the db apollo anc the collecion eacmscache, the index of key is created,
Is many query of apollo.eacmscache cause the cpu spike ?
  
6 now, i see the w status, the cpu is normal, and why ? i can't find any error infomation about this spike.
  
7 i sent email to jeff,and he told me :
they are pictures cache of the website of OC,it's ok,np,ignore it,pls.

 

你可能感兴趣的:(mongodb)