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

Low CPU Utilisation But High CPU Load Wordpress Ubuntu Apache2

· 52CE 我爱测

My Ubuntu 18.04 server with 2GB of RAM and 2 CPU cores experiences major CPU load spikes when someone accesses the Wordpress site that the computer serves. This slows down the website very much. Below is the output from a top com…

问题原文

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

My Ubuntu 18.04 server with 2GB of RAM and 2 CPU cores experiences major CPU load spikes when someone accesses the Wordpress site that the computer serves. This slows down the website very much.

Below is the output from a top command

In the screengrab above, the load is shown to be 3.8, but most of the time it rises to 5.0 - 6.0.

The server runs Apache2 in Event MPM, MySQL 8 and PHP7.3. Redis caching is also present.

Due to this load spike, my website times out with a Cloudflare 524 error and I'm unable to log into wp-admin.

Is there any way to fix this?

EDIT:

Here is a link to the output of the MySQLTuner tool run on this system. https://pastebin.com/awxRidr3

And here is the link to the output of cat /proc/meminfo. https://pastebin.com/E9uvq5A9

已采纳解答

原帖链接 · John Mahowald · CC BY-SA 4.0

Performance issues can be any number of things. Investigate everything and keep an open mind.

73% IO wait suggests the storage system is a limiting factor.

Install bpfcc-tools and run filetop to see reads and writes by file. Classify what gets lots of I/O: database, uploaded content, the web application, whatever. Use ext4slower (or xfsslower) scripts to find file system operations that take more than a few milliseconds.

Possible actions:

  • Migrate to solid state disks if you have not already
  • Enable and review the slow query log
  • Consider a separate database host, possibly a managed service
  • Find some of the many WordPress checklists and evaluate their suggestions
  • Do a capacity analysis and determine if it is time to scale out or up.

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

资料来源与适用范围

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

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

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