Announcement

Collapse
No announcement yet.

Single processor multiple cores

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Single processor multiple cores

    I've written an application that does some speed critical code. It runs just about fast enough on my laptop - during the time critical stuff it is pretty much single processor(core) bound. On a custome machine it runs slightly slower.

    My machine is a Dell Vostro with:
    Intel Core2 Duo CPU T9550 @ 2.66Ghz, 1 pyhsical, 2 Cores

    Customer machine is:
    Intel Xeon CPU X3430 @2.40 Ghz, 1 Physical, 4 Cores

    I guess the question is that given the benchmark for the Xeon is not quite twice the score for the T9550 - and therefore actually less per core; should I actually expect it to be slower in compute intensive single core tasks - and therefore to take advantage of the Xeon do I need to change my code to enable multi-threading in my compute intensive stuff? (The other threads aren't idle, but the whole system is maybe 30% used)

    Any help gratefully received.

  • #2
    If performance is important and your code will be in use for a few years, then yes you should thread the code. Assuming it is an algorithm that lends itself to threading. This is true regardless of the CPU you are using for development or what the customer is currently using.

    Current and future CPUs will have far more than 4 cores. We have already seen systems with 80+ cores. (Mind you supporting more than 64 cores in any application is hard work as Windows only supports 64 cores for CPU affinity).

    Comment


    • #3
      Thanks for that.

      But am I right in assuming that the benchmarks utilise all the cores of a machine; so that if a machine with four cores has a benchmark score twice that of a machine with two cores; then effectively each core is running at more or less the same speed?

      Comment


      • #4
        The CPUBenchmark uses all available cores (up to 64 in V7).

        In V8 we'll probably make the limit more around 256 cores.

        Comment


        • #5
          Thanks for the quick response, but I don't understand how that answers my question.

          If I have a some compute bound code running in a single thread and therefore stuck on a single core would you expect it be running faster/slower/same on machine a or b:

          machine a: benchmark 2000, 1 processor with 2 cores
          machine b: benchmark 4000, 1 processor with 4 cores

          I'm only looking for the general principle I won't be holding you to it

          Cheers, Des

          Comment


          • #6
            I don't understand how that answers my question
            You asked if the benchmark uses all cores.
            The answer was CPU Benchmark uses all available cores (up to 64 in V7).

            I would expect a single thread to run roughly the same on both machines. But this is very simplistic view. Real life is rarely that simple. There are a whole host of factors that may alter performance of specific code on one machine compare to another.

            Comment


            • #7
              Thank you very much indeed, that has cleared up the issue for me; I'm going back to see if I can improve my algorithm, utilise the cache more, consider another thread etc.

              Cheers, and thanks for your patience. Des

              Comment


              • #8
                Some other tips.

                Comment

                Working...
                X