Now comes the hard limit. I've put all my tickets with the Enhance support team together below.
This applies to a BM 16c/32t.
Basic rules
We've decided to build our hard limits based on the number of PHP Workers.
- Memory limit: by an increment of 1000 MB/plan
- Virtual CPUs: 1 vCPU = 2 PHP workers
- I0PS: Unlimited
- I0 bandwidth: Unlimited
- Nproc: 20
WordPress is single-threaded. One request equals one PHP worker, which equals one CPU core.
2 PHP workers = 1 vCPUs
1 PHP Worker = 128 MB RAM
Memory
If you want the 4 PHP workers to have the ability to max out a CPU core at the same time, then you would need 4 vCPUs assigned.
However, this is unlikely to happen unless the site is extremely busy, so 2 might be more appropriate.
I would allow for 1 PHP process to be approximately 75MB, so for 4 concurrent, you would need 300MB plus some headroom for SSH/cron/etc. Maybe 512MB is a good starting point. If a website runs out of RAM, it will fail quite ungracefully as its PHP workers are killed.
However, it looks from your pricing page like these are pretty high-end plans; therefore, you could probably be a lot more generous with the limits. They primarily exist to prevent shared servers from overload. It's unlikely that more than one site at a time would suffer from high traffic or malware. Therefore, you could allow 1GB on your smallest plan, 2GB on the following plan, and so on.
Virtual CPUs
Max vCPU for no contention = 16 CPUs and not 32 threads based on our BM server.
CPU threads are a little tricky. The kernel sees them as CPUs, so 1 vCPU would be 100% of a CPU thread rather than a core. If you want to guarantee no contention, you shouldn't assign more than 16 vCPUs (on your BM 16c/32t).
However, in practice, it's very unlikely that more than one site will max out its CPU simultaneously, so it is possible to oversell the available resources by quite a lot.
2 vCPUs would enable 4 PHP workers to consume 50% of one core each. However, again, this is unlikely, especially with full-page caching.
Nproc
I would set Nproc limit to protect your system. 20 should be sufficient for most usage cases.
I0SP & I0 bandwidth
Unless your disk performance is constrained, I would leave IOPS and IO Bandwidth unrestricted.
Setting up I0PS at 2000 is a good starting point.