Does NGINX or Apache take advantage of a server which has either:

  • Multi-cores, or

  • Multiple processors?

If that's the case, why?

Using several Processor chips/CPU-Cores gives server programs the chance to process several client connections (and demands) in parallel (achieving greater performance).

In an enormous amount of multi-Core Processor chips, the question continues to be subject of extensive research.

You will find 3 methods for addressing parallelism (like multi-Core Processor chips):

  1. using several processes

  2. using several threads in one process

  3. using several threads in a number of processes.

Apache has investigated several models, and Nginx is applying option #1.

Which model works better is usually considered like a few implementation (a minimum of under Unix where processes are extremely light to allow them to contend with threads).

Now, to the question my prediction (according to reading through tests released here) is the proper (multi-thread) Apache architecture should scale much better than Nginx on multi-Core Processor chips.

Paradoxally, it doesn't imply that Apache is faster than Nginx: it simply implies that on 1, 2, 3, ... 16 Cores, Apache would scale much better than Nginx WHILE Nginx would process more client demands:

  • Performance will be fast (processing more demands per second on one-Core CPU)

  • Scalability is a chance to process more demands per seconds as the amount of CPU Cores develops (the perfect would be to scale linearly: doubling the demands per second while you double the amount of CPU Cores).

Scaling without performance is pointless if the amount of demands per second from the server which scales is inferior towards the speed from the server which doesn't scale (observe that when the server REALLY scales well, there is a point where getting MANY Cores should allow it to be perform much better than the server that doesn't scale).

Carrying out without scaling is creating a server not able to make the most of multi-Core Processor chips.

The near future will definitely be produced of server programs that both properly, to supply the very best performance under all conditions (only a couple of Cores or many-many Cores).

Yes.

I suppose your real question is whether either is much better?

By which situation it is a fairly complicated question, but generally I'd expect that multiple processors will work better.

Here is a good answer explaining the architecture of both: nginx : Its Multithreaded but uses multiple processes?

Nginx fires up new processess for every client request, so although it isn't multithreaded (good... eliminates threads issues), the operating-system can make the most of multiple cores/cpu's by arranging each process on the different cpu.

Only multi-threaded systems may benefit from multi-cores. I understand Apache is multi-threaded and it is performance increases with multi-core. Typically performance rises with multi-core when the try to be achieved is split into small portions of labor which don't need to rely on one another. Apache begins ways to serve web demands and various demands can run at the same time on multiple cores, therefore enhancing performance. If NGINX is single-threaded, then it won't leverage multi-core.

Multi-core/multi-processor are identical factor within this context.