[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian with dual PIII 500



On Thu, 2004-02-05 at 07:43, Phillipus Gunawan wrote:
> G'day,
> 
> What is the benefit of having dual processor for a server box? Depending
> on the nature of the OS, some will boost, say, dual PIII 500 to become
> PIII 1000. Other OS can make the second CPU and back up processor just
> in case the first one blew up. And, another configuration, is, to
> separate a special software to use the specific CPU only.
> 
> These answers are mouth_to_mouth answers taht I can get from people
> around me. But I want to know more on how we can set these setting under
> Debian. Any direction?
> 
> What the most common use of dual processor in Debian Server?
> 
> Lets say I want to build Tomcat-Java server, the Java compilation will
> take first CPU ussage and tomcat itself will take the second CPU. Is
> this possible?
> 
> Thanks in advance for any helpfull information.
> 

The only time you benefit from having dual CPUs is when you are doing
tasks in parallel (you can "walk and chew gum at the same time"). Code
that is built to be executed asyncronously (aka multi-threaded code) can
perform better on multiple processors. Database software, for example
often has to handle multiple queries simultaneously, and instead of
putting all of the queries in a queue and executing them one at a time,
it spawns threads (processes within a process) and tries to handle all
the queries at the same time. Now, when run on a single CPU machine,
each of those threads have to line up at the 1 CPU and wait their turn
for execution anyway (there are still some benefits to multithreading,
even on a single CPU, but lets ignore that ATM). On a multi-CPU system,
these threads can actually be executing at the same time on different
processors, thus speeding things up. Similarly, to separate processes
can be run simultaneously as well (ie. apache could be running on CPU0,
and mysql could be using CPU1).

All this being said, a dual 650 MHz system is not necessarily going to
be as fast as a single 1.2 GHz system because of the overhead of
deciding which processor gets to do what, etc, etc.

It is possible to set process affinity using utilities in the shedutils
package.

-davidc



Reply to: