Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Multi-core and the future

by CountZero (Bishop)
on Aug 30, 2008 at 15:13 UTC ( [id://707927]=note: print w/replies, xml ) Need Help??


in reply to Multi-core and the future

As was said during the last YAPC::EU in Copenhagen, multiple cores means also a lower clock-speed, so any application that runs in only one core is by definition running slower and is essentially at the mercy of the OS whether its core gets shared with other applications, slowing it down even more.

Not all applications are open to parallel execution. A "read one line, do something with it, write the result to a file, start over again" is basically something sequential that would need a lot of overhead to split it over multiple cores. I think the majority of the scripts we write are of this type.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Replies are listed 'Best First'.
Re^2: Multi-core and the future
by tilly (Archbishop) on Aug 30, 2008 at 21:48 UTC
    Sorry, but multiple cores do not by definition run any slower.

    Sure, if you have a CPU that can be run in multiple modes, the option with more cores will be slower than the one with 1 core. However we've hit intrinsic limits on how fast we can make CPUs. Therefore Moore's Law can only continue by increasing the number of cores. Therefore over time we expect to see clock speeds remain about where they are, but the number of cores will increase.

    Now you're right when you say that you're at the mercy of the OS to decide whether your core is shared with other applications. But with 1 core you had to share that CPU anyways. And as you increase the number of cores, the odds that other applications need to be scheduled on your core goes down. Which is good. The bad, though, is that managing more cores takes OS time. So if you have too many cores, then with an SMP system the core you're on won't be doing full work.

    However modulo that small effect, if you're happy with the current speed of your code, multiple cores is not a big deal either way. It is only an issue if your code needs to go faster than it does already.

      Don't be sorry, you are probably right!

      What I meant, but failed to make clear, was that in general processors with more cores have a lower clockspeed. Sure there are high speed multi core processors but they tend to get very much more expensive; so "dollar for dollar" I feel that you get more processor capacity at a lower clock speed.

      CountZero

      A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://707927]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2024-04-23 08:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found