大网数据广告活动
服务器运维问答

LAMP Stack and VPS Performance

· 52CE 我爱测

I have a VPS (Intel Xeon CPU E5-2630 v4 @ 2.20GHz, 4 cores - 8 GB RAM - 200 GB SSD) and I am using it to host a Wordpress blog. I am using Virtualmin as a control panel, The operating system is Centos 7. I am having performance i…

问题原文

原帖链接 · Appoodeh · CC BY-SA 4.0

I have a VPS (Intel Xeon CPU E5-2630 v4 @ 2.20GHz, 4 cores - 8 GB RAM - 200 GB SSD) and I am using it to host a Wordpress blog. I am using Virtualmin as a control panel, The operating system is Centos 7.

I am having performance issues, and I don't know where to start.

top - 21:22:16 up 18:09,  1 user,  load average: 9.56, 5.84, 3.38
Tasks: 201 total,   7 running, 194 sleeping,   0 stopped,   0 zombie
%Cpu(s): 90.2 us,  9.4 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.3 si,  0.1 st
KiB Mem :  8008656 total,   801596 free,  3099284 used,  4107776 buff/cache
KiB Swap: 10485756 total,  9760492 free,   725264 used.  4302252 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 1722 mysql     20   0 4083800   1.7g   4140 S  66.2 22.1 371:01.54 mysqld
31511 fooshya   20   0  628688 104348  32320 R  34.8  1.3   1:52.20 php-fpm
31582 fooshya   20   0  604552  81988  34116 R  33.8  1.0   2:03.97 php-fpm
31585 fooshya   20   0  632392 113924  39844 R  32.5  1.4   1:36.74 php-fpm
22897 fooshya   20   0  641040 120832  36444 S  32.1  1.5  19:49.99 php-fpm
31587 fooshya   20   0  585320  68164  41188 R  31.1  0.9   1:41.48 php-fpm
22880 fooshya   20   0  939132 143248  47484 S  26.2  1.8  20:49.46 php-fpm
22888 fooshya   20   0  654676 130512  34744 R  25.5  1.6  17:42.91 php-fpm
22883 fooshya   20   0  651084 134228  39416 S  23.8  1.7  19:36.57 php-fpm
31586 fooshya   20   0  725716  67072  45660 S  19.2  0.8   2:16.77 php-fpm
 2699 root      20   0  199676  88352   3156 R  16.9  1.1   0:01.40 /usr/libex+
31525 fooshya   20   0  599108  77260  34660 S  14.2  1.0   1:12.42 php-fpm
 2698 root      20   0  572180  63264  39288 S   4.3  0.8   0:01.72 php-cgi
    1 root      20   0  191312   3064   1668 S   1.3  0.0   0:34.44 systemd
  553 dbus      20   0   58444   1068    672 S   1.0  0.0   0:26.30 dbus-daemon
 3501 named     20   0  540292 120020   2472 S   1.0  1.5   1:34.29 named
  369 root      20   0   81196  34516  34360 S   0.7  0.4   0:31.72 systemd-jo+

I tried various configurations of Apache, PHP FPM, MySQL, but the website still became unresponsive many times during the day.

I appreciate any suggestion.

已采纳解答

原帖链接 · bokan · CC BY-SA 4.0

There's clearly a problem with the plugins on your website. Your VPS should be able to handle 100 times this trafic (if everything was well optimized).

You need to find the faulty script. Setup a simple load test with any performance testing tool (record one visit and simulate thousand users doing the same). Then disable some plugins, test performance, disable some other plugin, test performance again... You'll quickly found the slow plugins.

Changing the VPS for a more powerful one will not change much. Hardware hardly compensate poor software.

Also enable a cache plugin if possible.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-06-02)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。