Friday, July 1, 2011

Genetic Algorithm – Part 6 - Benchmark multithreaded C# code

I did several runs on various machines and below are the reading and they speak for itself. First up comparison on 2 core and 16 core.



























Above reading might be puzzling to some who might have thought 16 core machine should have taken 9 sec. I have been part of discussions where software engineers have argued that if one thread takes X time then then eight thread should do work in X / 8 time.Apart from IO, memory bottlenecks that can happen between threads.Even before you can do multithreading the moment you have multiple processor there are bottlenecks.

When we have a system with just one processor, and if we add three more, we will not have four times the performance. This is because each time we add a processor, the time they dedicate to coordinate their work and the task assignment process increases. Table below summaries it best.



In next post I will compare performance between SQL and C#.

No comments:

Post a Comment