0

I'm runnning Directadmin with apache2 and MariaDB server. But I'm having a hard time to understand why my server's CPU usage is so high.

htop screenshot

When I try to look what is happening with strace, for some reason it is stuck on read(7,.

[root@s1 my.cnf.d]# strace -p 6780
strace: Process 6780 attached
read(7,

But when I try to see what files are open (with htop by pressing l), they are constantly changing. Problem started few days ago, average request count per second did not change. I'm trying lots of various methods to check the problem, but can't find any solution.

Apache server-info:

Current Time: Sunday, 22-Dec-2019 21:15:57 EET
Restart Time: Sunday, 22-Dec-2019 20:43:12 EET
Parent Server Config. Generation: 1
Parent Server MPM Generation: 0
Server uptime: 32 minutes 44 seconds
Server load: 22.42 16.36 10.82
Total accesses: 25799 - Total Traffic: 148.9 MB - Total Duration: 22078672311849
CPU Usage: u1358.74 s2198 cu33.49 cs58.63 - 186% CPU load
13.1 requests/sec - 77.7 kB/second - 5.9 kB/request - 855796000 ms/request
36 requests currently being processed, 92 idle workers

KR_W_LRLC____WR_R_L__R___R_RLL___L__LL_RL_R___L__L______LRLW_R_L
________L__________R____________________R____L_____L____R_______

top:

top - 21:22:43 up 26 days,  5:52,  1 user,  load average: 17.54, 16.13, 12.58
Tasks: 391 total,   3 running, 388 sleeping,   0 stopped,   0 zombie
%Cpu(s): 49.9 us, 49.6 sy,  0.0 ni,  0.3 id,  0.0 wa,  0.0 hi,  0.2 si,  0.0 st
KiB Mem : 32605832 total,   218292 free,  2629852 used, 29757688 buff/cache
KiB Swap: 16383996 total, 11705240 free,  4678756 used. 29463816 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 6780 apache    20   0 3738384 275780   5580 S 250.0  0.8  63:01.83 httpd
 6184 mysql     20   0 9831040 514744   6560 S  61.9  1.6  31:56.88 mysqld
 6947 apache    20   0 3602964 189968   4740 S  43.7  0.6  12:10.16 httpd
   46 root      20   0       0      0      0 S   9.9  0.0 428:13.94 kswapd0
 6257 dh00001   20   0  882312 197940  20488 S   3.6  0.6   0:57.29 php-fpm71
18045 admin     20   0  414864  26080  16620 S   3.3  0.1   0:01.30 php-fpm56
 7697 admin     20   0  415160  27148  17944 S   3.0  0.1   0:08.30 php-fpm56
 7707 admin     20   0  417504  28980  19428 S   3.0  0.1   0:08.89 php-fpm56
 7715 admin     20   0  417912  41828  31608 S   3.0  0.1   0:06.76 php-fpm56
15535 admin     20   0  415520  40260  30392 S   3.0  0.1   0:04.53 php-fpm56
15545 admin     20   0  415116  39756  30124 S   3.0  0.1   0:03.96 php-fpm56
 7672 admin     20   0  414948  40748  31456 S   2.6  0.1   0:08.54 php-fpm56
...

Thank you in advance.

N. G.
  • 21

0 Answers0