Salta al contenuto principale

CentOS 7 - Networking Support • My web server is slow

Hello,
My server has 6 GM RAM and 4 virtual CPUs. This server hosts a WordPress website. I checked some parts of the server as follows:

CODE:

# free              total        used        free      shared  buff/cache   availableMem:        5924976     1726272     2069744      353176     2128960     3547828Swap:       2097148           0     2097148
And:

CODE:

# df -ihFilesystem              Inodes IUsed IFree IUse% Mounted ondevtmpfs                  721K   378  721K    1% /devtmpfs                     724K     1  724K    1% /dev/shmtmpfs                     724K  1.5K  722K    1% /runtmpfs                     724K    16  724K    1% /sys/fs/cgroup/dev/mapper/centos-root    16M  952K   15M    7% //dev/sda2                  64K    53   64K    1% /boot/dev/sda1                    0     0     0     - /boot/efi/dev/loop0                256K    27  256K    1% /tmptmpfs                     724K     1  724K    1% /run/user/0
And:

CODE:

# iostat -x 5Linux 3.10.0-1160.88.1.el7.x86_64 (MyServer.CloudServer.com)     09/13/2023     _x86_64_    (4 CPU)avg-cpu:  %user   %nice %system %iowait  %steal   %idle          15.54    0.04    5.15    0.34    0.00   78.93Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %utilsda               0.15     7.17    7.37    6.26   113.33   492.67    88.92     0.34   24.72   23.86   25.73   0.83   1.13dm-0              0.00     0.00    7.05   12.54   111.32   489.09    61.29     0.36   18.18   33.61    9.51   0.58   1.13dm-1              0.00     0.00    0.48    0.89     1.94     3.55     8.02     2.66 1937.14   53.13 2960.46   1.51   0.21
And:

CODE:

# mpstat -P ALL 5Linux 3.10.0-1160.88.1.el7.x86_64 (MyServer.CloudServer.com)     09/13/2023     _x86_64_    (4 CPU)02:46:44 PM  CPU    %usr   %nice    %sys %iowait    %irq   %soft  %steal  %guest  %gnice   %idle02:46:49 PM  all    2.42    0.00    1.56    0.05    0.00    0.10    0.00    0.00    0.00   95.8702:46:49 PM    0    1.61    0.00    2.21    0.00    0.00    0.00    0.00    0.00    0.00   96.1802:46:49 PM    1    7.23    0.00    3.41    0.00    0.00    0.20    0.00    0.00    0.00   89.1602:46:49 PM    2    0.20    0.00    0.20    0.00    0.00    0.20    0.00    0.00    0.00   99.3902:46:49 PM    3    0.40    0.00    0.60    0.20    0.00    0.00    0.00    0.00    0.00   98.80
And:

CODE:

# iostat -xd -k 2 5 or iostat -pLinux 3.10.0-1160.88.1.el7.x86_64 (MyServer.CloudServer.com)     09/13/2023     _x86_64_    (4 CPU)Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %utilsda               0.15     7.17    7.37    6.26   113.31   492.59    88.91     0.34   24.72   23.86   25.73   0.83   1.13sda1              0.00     0.00    0.00    0.00     0.01     0.00    31.68     0.00    0.77    0.65    2.60   0.51   0.00sda2              0.00     0.00    0.00    0.00     0.05     0.04   182.07     0.00    7.87    8.52    5.77   5.69   0.00sda3              0.13     6.76    0.99    2.94    23.29    56.14    40.42     0.16   40.14   45.31   38.39   1.27   0.50sda4              0.02     0.39    6.05    2.06    73.87    88.20    39.97     0.10   12.65   13.23   10.95   0.97   0.79sda5              0.00     0.01    0.32    1.27    16.08   348.21   459.38     0.08   48.23  159.59   20.33   2.13   0.34scd0              0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00    0.00    0.00   0.00   0.00dm-0              0.00     0.00    7.05   12.54   111.30   489.00    61.28     0.36   18.18   33.61    9.51   0.58   1.13dm-1              0.00     0.00    0.48    0.89     1.94     3.55     8.02     2.66 1937.14   53.13 2960.46   1.51   0.21loop0             0.00     0.00    0.00    0.00     0.00     0.00     0.00     0.00    0.00    0.00    0.00   0.00   0.00
And:

CODE:

# pidstat 5Linux 3.10.0-1160.88.1.el7.x86_64 (MyServer.CloudServer.com)     09/13/2023     _x86_64_    (4 CPU)02:49:31 PM   UID       PID    %usr %system  %guest    %CPU   CPU  Command02:49:36 PM     0         9    0.00    0.80    0.00    0.80     2  rcu_sched02:49:36 PM    99     30344    0.40    0.40    0.00    0.80     0  httpd02:49:36 PM     0     33184    0.20    0.60    0.00    0.80     3  pidstat02:49:36 PM     0     64839    0.20    0.20    0.00    0.40     3  cspfwd02:49:36 PM    27     69539    3.78   14.74    0.00   18.53     2  mysqld02:49:36 PM     0    120682    1.20    0.20    0.00    1.39     1  python302:49:36 PM     0    121404    0.00    0.20    0.00    0.20     2  imunify360-php-02:49:36 PM     0    121464    0.00    0.20    0.00    0.20     2  imunify-auditd-02:49:36 PM     0    121574    0.20    0.60    0.00    0.80     3  imunify360-unif02:49:36 PM     0    126016    0.00    0.20    0.00    0.20     2  kworker/2:0
And:

CODE:

# ps -e -o pcpu,nice,state,cputime,args --sort -pcpu | head -10%CPU  NI S TIME     COMMAND12.7   0 S 11:50:13 /usr/sbin/mysqld 1.4   0 S 00:01:46 /usr/sbin/imunify360-unified-access-logger 1.2   0 S 00:01:38 /opt/imunify360/venv/bin/python3 -m im360.run 0.7   0 S 00:15:22 /usr/sbin/pam_imunify_daemon.bin 0.6   0 S 01:41:24 [rcu_sched] 0.3   0 S 00:00:01 /usr/sbin/httpd -k start 0.3   0 S 00:00:25 /usr/sbin/imunify-realtime-av 0.2   0 S 00:00:01 /usr/sbin/httpd -k start 0.1   0 S 00:15:11 /usr/lib/systemd/systemd --switched-root --system --deserialize 22
The MySQL configuration is:

CODE:

[mysqld]performance_schema           = 0show_compatibility_56        = 1datadir                      = /var/lib/mysqlsocket                       = /var/lib/mysql/mysql.sockslow-query_log_file          = /var/log/mysql-slow.loglog-error                    = /var/log/mysqld.logmax_allowed_packet=268435456default_storage_engine         = InnoDBmax_connections                = 151max_user_connections           = 50thread_cache_size              = 151query_cache_type               = 1query_cache_size               = 64Msort_buffer_size               = 2Mtmp_table_size                 = 32Mread_buffer_size               = 128kread_rnd_buffer_size           = 256kjoin_buffer_size               = 128ktable_definition_cache         = 400table_open_cache               = 400slow_query_log_file            = slow.logslow_query_log                 = 0log_queries_not_using_indexes  = 1long_query_time                = 0.5min_examined_row_limit         = 100max_heap_table_size            = 64Minnodb_buffer_pool_size        = 10Minnodb_file_per_table          = 1innodb_flush_log_at_trx_commit = 2innodb_log_buffer_size         = 8Minnodb_log_file_size           = 100Mlog_binexpire_logs_days               = 7
And the important part of Apache is as follows:

CODE:

Timeout 45KeepAlive OnMaxKeepAliveRequests 100KeepAliveTimeout 15<IfModule mpm_prefork_module>StartServers        3MinSpareServers     3MaxSpareServers     3ServerLimit         50MaxClients          50MaxRequestsPerChild 1000</IfModule><IfModule mpm_worker_module>StartServers        3MaxClients          50MinSpareThreads     3MaxSpareThreads     3 ThreadsPerChild     25MaxRequestsPerChild 1000</IfModule>
It is not only the website that is slow, but also the system itself. MySQL seems to use more memory and CPU than other processes. What other parts should I check?

Thank you.

Statistics: Posted by hack3rcon — 2023/09/14 11:35:07


Distro