Performance Issues: php-fpm Overload, Low Memory, Slow Database
We're facing some serious performance issues on our website, especially slow response times during product edits and searches, and sometimes the server goes down for like 14 minutes. After some investigation, our server admin has identified several areas of concern:
- High CPU usage, particularly from php-fpm. Should this be adjusted?
- Low available memory with no additional swap space
- Slow disk I/O
- Insufficient database buffer pools
Suggestions from our admin:
- Add 8GB of swap space
- Lower vm.swappiness
- Upgrade to PHP 8.3
- Increase CPU cores/power by 40%
- Add more disk space
- Possibly separate the database from the web server
Current server specs:
- 2.60 GHz CPU cores
- 15.37 GB RAM
- 14 GB free disk space
- Database size: 1.4 GB
- PHP version: 8.0/8.1
- DigitalOcean Droplet (Dedicated)
- 16 GB Memory / 4 Intel vCPUs / 60 GB Disk
We’ve already increased the database buffer pools from 128 MB to 512 MB.
I’m seeking advice on:
- Optimal settings for our current configuration.
- cPanel-specific optimizations we can apply to enhance performance.
- Upgrade recommendations within cPanel/WHM to address these issues.
Any help or guidance on improving the setup would be greatly appreciated. Thank you in advance for your insights!
Additional details:
- cPanel Version: cPanel & WHM v122.0.17
- OS: AlmaLinux v9.4.0
- 16 GB Memory / 4 Intel vCPUs / 60 GB Disk
- Not seeking support through other forums.
Thanks,
Sharif
-
Hey there! Let's start with this portion of the issue:
especially slow response times during product edits and searches, and sometimes the server goes down for like 14 minutes.
When you say "the server goes down" can you provide more details on what you're seeing? Is the entire system unreachable (WHM, cPanel, ping, basic DNS functions, etc) or just the website is offline? Knowing that will help get us pointed in the right direction.
As far as optimizing the machine, you'll have to do a bit more troubleshooting first and find where the problem is. You can optimize Apache and PHP-FPM, but if the issue is with the database system that isn't going to help.
I always encourage people to check two things when the system experiences slowness:
-the output of "apachectl status"
and
-the output of "mysqladmin proc status"That will show you what the webserver and the database server is doing in real-time during the slow period and should help you get pointed in the right direction.
We also have a nice guide about troubleshooting load that you may find helpful here: https://support.cpanel.net/hc/en-us/articles/360056001894-How-to-diagnose-high-server-loads
0
Please sign in to leave a comment.
Comments
1 comment