Home  >  Q&A  >  body text

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}])
黄舟黄舟2713 days ago288

reply all(1)I'll reply

  • 阿神

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

    Enter the mysql command line

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

    Take a look at what will be queried at the highest peak. Since mysql is doing something, and you want to know what it is doing, will you know if you take a look?

    reply
    0
  • Cancelreply