Solutions for overloaded WordPress Linode
I'm running a WordPress website on a Linode shared plan with 4GB RAM. I've already implemented caching with plugin and Redis, plus the site is behind CloudFlare, and on average CPU utilization is 98% average for a two-core processor, which looks mostly fine, but sometimes there are peaks, and when that happens the system is completely overloaded:
https://www.cnx-software.com/wp-content/uploads/2021/02/cnx-software-overloaded.jpg
The load average gets over 6, and sometimes well over that value. Also, if I clear the cache, the website is basically unusable for a few hours. For reference, there are around 10,000 posts, 100,000 comments in the website.
So I've been thinking of improving performance, but I'm not sure what may be the best way:
- Upgrading to dedicated CPU plan, but large databases/WordPress are not part of the use cases listed @ https://www.linode.com/docs/guides/dedicated-cpu-use-cases/, although another post says it might: https://www.linode.com/community/questions/19437/does-a-dedicated-cpu-or-high-memory-plan-improve-disk-io-performance
- Moving the database to a 2GB Linode (Shared) in the same datacenter with local IP.
- Load balancing
Now, I'm leaning towards 2, and I've seen a good tutorial: https://www.linode.com/docs/guides/configure-wordpress-remote-database/, but I'd still like feedback in case somebody has a better idea or other recommendations. Thanks in advance.
1 Reply
Hey @CNXSoft. Splitting up the workload or increasing your plan to something with additional cores is most likely the way to go. In terms of the options you mentioned:
- A dedicated plan will help ensure that your server doesn't get impacted by any "noisy neighbor" Linodes on the same host. They're generally recommended in case you're concerned about a shared hosting environment affecting your use case.
- If I'm understanding you correctly: Moving the db to another server in the same data center and splitting up the workload is a nice option. A bit more legwork in terms of setup, but not a bad option.
- Load balancing (see NodeBalancers) would help balance out large amounts of traffic that might cause your server to get overloaded (up to 10,000 concurrent connections per NodeBalancer). NodeBalancers run $10/month prorated, so you can always try it out and see if it helps. If your setup calls for it, load balancing can also be great for staging situations, too.