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

Re: debian-user] Re: AMD vs Intel and the Debian kernel

On Mon, Aug 18, 2008 at 02:03:57PM -0600, Ted Hilts <thilts@mcsnet.ca> was heard to say:

  [snipped -- please don't repeat long emails if you're just responding
   to one part]

> Also, recently, I discovered that  a dual or quad  CPU board only  
> provides  load balancing and not greater speed.  If for example the CPU
> speed is given as 3 Gb and there are numerous servers on that machine  
> the speed of each of the two (dual core) or 4 (quad core) or 8 core  
> components is reduced thus reducing the speed of each process so the  
> total processing of core elements is 3 Gb.  This means for an 8 core  
> unit the speed is reduced to 3 Gb divided by 8.  At this time I haven't  
> got a clue whether the virtual system should be single core or multi  
> core as there could be speed advantages and perhaps the manner of  
> virtualising might work best by using some kind of quota control???

  This paragraph is an odd combination of truth and confusedness.  It's
true that having more cores gives you load balancing and not better
speed.  Sort of.  Except sometimes it does give you better speed.

  What multiple cores gives you is more processing units -- the chips
that do the actual computation in your computer.  To simplify just a bit:
if you just have one processing unit, your computer can only execute one
instruction at once.  If you have (say) three, it can execute three
instructions at once and do three times as much computation per unit of
time.  That doesn't mean that it's three times as fast at any *given*
task, though, because computing tasks are typically described as a series
of steps that must be performed in a particular order to come out right.
The time it takes to finish a computational task described this way
depends on how long it takes to perform all the steps in the task, in
order.  Since the steps have to be performed one at a time and in order,
having more processors won't give you a speed bonus.

  To put it another way: you can imagine a single-core machine as a guy
sitting at a desk furiously scribbling away at arithmetic problems.  [0] A
multi-core machine gives you more of these guys -- say there are two of
them.  If you have a list of addition problems and you split it into two
lists, you'll find that you can solve twice as many of them in a unit of
time versus just having one guy doing the work.  On the other hand, if
you give them one enormous addition problem (say, adding two
million-digit numbers), only one of them will have work to do and it'll
take just as long as if you had only one "core". [1]  In the context of
a real computer, what this means is that programs which aren't designed
to run efficiently on multi-core machines will run at the same speed on
a multi-core machine as they do on a single-core machine, but you can
run more of them at once without slowing down.

  However, that doesn't mean that you lose speed.  At the worst, your
computer will run just as quickly (or slowly) as with one core. [2]
Besides, for what you're doing multiple cores is exactly right: since
each virtual machine is essentially a separate process, getting more
cores should let you run more virtual machines at once.

  I think you may be thinking of memory, or specifically RAM.  That's
the amount of memory your computer can use as temporary working space
For instance, a high-end computer might have 3 or 4 GB of memory.  All
the virtual machines you run share this space, so you need to make sure
you have enough memory for all of them.  This doesn't really have
anything to do with having multiple cores -- except that multiple cores
make it easier to run more processes at once, which will require more

  The good news is that if you have a 64-bit processor, the
amount of memory you can install is limited only by the amount your
motherboard can recognize.  Also, memory is super-cheap nowadays.  So
if you have 8 virtual machines and you want each to have access to a
gigabyte of memory, throw 8GB in on top of what the host system needs
and you should be good.

  See http://en.wikipedia.org/wiki/Multi_core for more information
on multi-core systems.  I would highly recommend using Wikipedia as a
reference; many of your questions could have been answered more
expeditiously by consulting it first.


  PS: I should mention this but couldn't find a way to fit it into my
      email: if you actually do mean CPU speed, you're using the wrong
      units.  Gb (gigabyte) is a unit of measure for describing amounts
      of memory; the comparable unit for CPU speed is GHz (gigaherz).
      The two have about as much in common as kilometer and kiloliter,
      and if you mix them up people will have trouble understanding
      what you're saying.

  [0] Another metaphor is a multi-lane highway.  Adding lanes doesn't
      let any individual car get down the highway faster, but it lets
      you move more cars per unit of time.  But since I think my
      computer is a little guy sitting at a desk, I default to that
      metaphor. ;-)

  [1] This assumes that you don't have any way for the two cores to work
      together.  Whole areas of computer science are devoted to figuring
      out how to get multiple processing units to work together

  [2] Maybe slightly less efficiently due to the overhead of
      coordinating the different cores, but not much.

Reply to: