views:

158

answers:

4

Let me frame it this way..

"Say I have an application server running on a single core Intel processor & serving 200 concurrent users. Will moving the hardware to a dual core system enable my application server to now serve say 350 concurrent users" ?

The base question I'm hoping to address is - "Can addition of extra processor cores help increase the I/O capabilities of the server". Because sometimes thats exactly what hardware vendors hint at when touting their multi-core servers.

A: 

That, of course, depends on how your application server was written. If the software doesn't use any parallel programming techniques, then you're not able to run it in parallel, even if the hardware supports doing so.

unwind
+1  A: 

You may or may not see a benefit, but as the CPU isn't really doing the I/O I wouldn't expect any significant benefit is the tasks are mainly I/O bound.

EDIT: My answer assumes, that your code is written such that you're actually utilizing multiple cores. If it isn't, your application will not benefit from additional cores but the machine will be better equipped for serving other simultaneous tasks.

Brian Rasmussen
+3  A: 

You have to profile your server, determine its bottleneck, and treat them.

If you are memory bound, buy more memory or buy a computer with faster memory.

If you are disk bound, and doing lots of serving static content, consider an SSD drive.

If its your database bound, consider that.

But usually you're "configuration bound", and tweaking your configuration e.g. changing the number of threads in a pool, or such, will give you immediate improvement.

Many webservers and databases are exactly the software written to take advantage of extra cores. Of course, many also charge licensing fees per core, so consider that aspect too.

Will
A: 

If your server is single threaded (using select based IO), and request processing is side-effect free (i.e. it could be conceptually parallelized), then certainly running (matched) multiple instances on a multi-core machine will maximize the computational utility of the machine.

Whether this translates to higher throughput or not is dependent on whether the request processing was cpu bound. As a rule of thumb, IO is the major bottleneck in distributed systems. But that said, if (request) message assembly requires significant computation, then there is a certain given cpu overhead per request beyond the IO costs. Having multiple cpus assist would clearly make a difference in that case.

Beyond protocol level considerations, obviously if processing each request requires significant computations, having a cpu bottleneck will impact the server availability. Using multiple CPUs will clearly help.