Maison  >  Questions et réponses  >  le corps du texte

mysql - WHM VPS的数据库优化问题,占用CPU资源太高了!!

如下面截图所示

占用CPY资源足足 343%,这太可怕了!
请教高手怎么优化?
点击“Trace”之后,看到进程一直在不断重复执行

fcntl(18, F_GETFL)                      = 0x2 (flags O_RDWR)
fcntl(18, F_SETFL, O_RDWR|O_NONBLOCK)   = 0
accept(18, {sa_family=AF_FILE, NULL}, [2]) = 342
fcntl(18, F_SETFL, O_RDWR)              = 0
setsockopt(342, SOL_IP, IP_TOS, [8], 4) = -1 EOPNOTSUPP (Operation not supported)
gettimeofday({1429663162, 700223}, NULL) = 0
mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7ff4f26ee000
mprotect(0x7ff4f26ee000, 4096, PROT_NONE) = 0
clone(child_stack=0x7ff4f272dfd0, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7ff4f272e9d0, tls=0x7ff4f272e700, child_tidptr=0x7ff4f272e9d0) = 4154
poll([{fd=15, events=POLLIN}, {fd=18, events=POLLIN}], 2, -1) = 1 ([{fd=18, revents=POLLIN}])
黄舟黄舟2764 Il y a quelques jours303

répondre à tous(1)je répondrai

  • 阿神

    阿神2017-04-17 12:04:48

    进到mysql命令行

    select * FROM information_schema.PROCESSLIST WHERE INFO IS NOT NULL;
    

    看一下在最高峰这个会查询到什么东西,既然mysql在做事,你又想知道它在做什么,去看看不就知道了吗?

    répondre
    0
  • Annulerrépondre