I have an Linux/Debian server with Intel i7 CPU with 4 cores and 8 threads. When I run my heavy duty Apache/PHP job it uses 1 thread, and when I run concurrent Apache/PHP jobs they each use their own thread.
So, if I want to be prepared for high traffic, is it simply a matter of maximizing the number of cores (by choosing other CPUs) to be able to handle more concurrent jobs, provided it has enough memory and that the database/filesystem doesn't pose extra challenges?
I have tried running 8 and 10 jobs concurrently and it used all threads and CPU utilization was mostly 100% (but ran flawlessly), so it seems like the theory is not completely off - but is there something else that could bust this linear thinking?
Alternatively I could go with a load balanced system with multiple servers but I wonder how far I can get with a single server.
PS. Apache/PHP is using mod_php with thread safety disabled, therefore it uses Prefork MPM. Not sure I dare use Worker MPM as I'm uncertain about thread safety...
PSS. Also, I'm not necessarily looking for better performance, mainly just be able to handle higher traffic/more concurrent jobs.