Google Answers Logo
View Question
 
Q: Dual processor servers: How do they work? ( Answered 5 out of 5 stars,   2 Comments )
Question  
Subject: Dual processor servers: How do they work?
Category: Computers > Hardware
Asked by: respree-ga
List Price: $5.00
Posted: 31 Oct 2002 17:43 PST
Expires: 30 Nov 2002 17:43 PST
Question ID: 94882
I'm looking for a simple answer and not inclined to read about how a
CPU actually works (life is too short).

I have a dual processor Linux server (AMD 1.67) .  Let's say there is
only one application running (humor me, I know other things are
running) that is hogging nearly 100% of the CPU (according to "top").

My question:  Are both processors equally handling the resources
needed to run this application?  Said another way, if I only had one
processor (all other things being equal), would it run approximately
half as fast?
Answer  
Subject: Re: Dual processor servers: How do they work?
Answered By: funkywizard-ga on 31 Oct 2002 20:03 PST
Rated:5 out of 5 stars
 
If the single program supported multi-threading, then yes it could be
using both CPUs more or less equally. What multithreading does is take
one program and break it up into multiple simultaneous "threads",
which are parts of the program that may run independantly. For
instance, adobe photoshop may have the user interface run in one
thread, while complex calculations run in another thread. This would
allow the user interface to still be responsive while performing
complex calculations.

However, the majority of consumer level software is not multithreaded
or multi-processor aware, and thus you will get the best benefit from
running multiple simultaneous applications. A single application will
not often do an effecient job of distributing the processing load
equally between two processors in a multi-cpu computer. Notable
exceptions are high end rendering software, graphics manipulation
programs, some video editing software, most database software, and
many other "server class" software products, most of which will do a
fairly good job of making full use of multiple cpus.

Directly related to your excess cpu usage noted, the TOP faq [
http://www.groupsys.com/topinfo/faq.html ] question #14 mentions that
you may see cpu usage readings in excess of 95% if you compile the
program incorrectly.

more info including the latest download of top is available here: [
http://www.groupsys.com/topinfo/ ]

The man page for top [ http://www.fmrib.ox.ac.uk/cgi-bin/man-cgi?top+1
] implies that the program will tell you which cpu is being used by a
process, so this may help you determine exactly what is going on.

Winstone is a prominant benchmarking program for windows. The website
for etestinglabs.com [
http://www.etestinglabs.com/bi/cont1998/1998print/doubleup.asp ] talks
a bit about dual processor systems with the winstone benchmark:

"Until this year, Winstone's tests--even those in High-End
Winstone--showed very little improvement when you ran them on
dual-processor systems. The reason was the amount of overhead involved
in the work that applications do: Though multi-threaded operations in
an application can take advantage of a second processor, most of the
operations most people perform are not multi-threaded. Those
single-threaded operations are so prevalent that they mask the effect
of a dual processor. You can also see the advantage of a second
processor when you run two or more programs at the same time, but the
standard Winstone tests ran only one application at a time."

So basically, your average home pc user will not see a 2x speed
improvement with dual processors in the real world when running just
one application at a time.

I provide some benchmarking provided by tomshardware.com to compare
two dual processor motherboards running with one or both processors at
once [ http://www.tomshardware.com/mainboard/01q1/010201/dual-06.html
]. The first benchmarks being 3d rendering, they showed 100% speed
improvement when using both processors. Their office applications
benchmark showed closer to a 5% improvement in speed when using both
processors vs using just one. Compiling a linux kernal showed about
50% improvement in speed for using both processors.

The general concensus amoung the sites I've viewed is that running a
dual cpu setup can provide a more responsive computing environment due
to one program not being able to hog all the cpu power at once, but
that you only really get significantly faster speeds when running
multiple applications or specifically tailored applications. Also,
I've read some comparisons between dual processor motherboards and
similar motherboards that only support one cpu, that have found the
single cpu motherboards to be faster due to more aggresive memory
speed and better overall efficiency and use of the latest
technologies. Unfortunatly, I was unable to locate these articles.

However, to get back to the main question, there is a low likelyhood
that your program that is running at 100% usage is using both
processors at once. Only high end software is designed to do this
efficiently if at all. Typically, even multithreaded software has one
thread that does the brunt share of the work, meaning you will not get
a 100% speed increase when using a dual processor system. When running
games that are only single processor "aware", you may actually see
decreased performance with the dual cpu board, since the dual cpu
boards typically have slower memory technology.

So in conclusion, a 1 cpu setup would not run about half as fast as a
dual cpu setup, and especially not when running just a single
application (excepting for 3d rendering), but a dual cpu setup under a
certain environments, such as a server environment, is still a great
asset.

If you are not satisfied with this answer please request that I
clarify my answer before giving a rating, as I would be happy to
modify the answer to better meet your needs.
respree-ga rated this answer:5 out of 5 stars and gave an additional tip of: $3.00
Wow!  That was much more information than I was expecting.  Very
thorough, well written answer.

The reason I was asking was because I was running 'top' the other day
and noticed while my perl scripted awstats log analyzer was running,
the CPU usage was 99%.  Granted, it only ran for 30 seconds or so, but
I was wondering if all my website visitors felt our website was
sluggish during that period.  (no need to answer or comment).  Thanks
very much again for your excellent work.

Comments  
Subject: Re: Dual processor servers: How do they work?
From: leverett-ga on 31 Oct 2002 18:16 PST
 
I'd be impressed if your one application managed to utilize 100% of
the 2 CPUs single-handedly.  Typically there are inefficiencies in
memory, cache coherency, which prevents both CPU's being used fully be
one application.  Usually with dual processor machines you're only
getting about 60% improvements for a well programmed multi-threaded
application over a single processor.  The efficiencies for SMP system
decreases as the number of processors increases.
Subject: Re: Dual processor servers: How do they work?
From: funkywizard-ga on 01 Nov 2002 00:31 PST
 
thanks for the additional tip. i enjoyed researching this question. as
for your particular use, I love awstats as my webhost uses it and it
gives me a lot of useful information. In your particular case, the
perl interpreter probably runs in a different thread than the
webserver (apache I assume) and thus, if your server is properly
configured, you should not notice a large slowdown during this
processing on a dual processor system. I know in windows 2000 you can
specify which cpu a program will prefer to use. I assume linux has a
similar function. If you set your perl interpreter to use a different
cpu than your webserver, you will get the best performance during this
30 second period. This may not be the default setup, so it would be
worth investigating on your part.

I know you said I didn't need to comment further, but I felt you could
use a bit more info given the exact scenario you described.

Thanks again for the additional tip, and I hope you use google answers
again in the future.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy