M76
[H]F Junkie
- Joined
- Jun 12, 2012
- Messages
- 14,038
I've just converted an old VB6 program with lots of mathematical calculations written years ago to VS2015 .NET.
I haven't changed anything about the code, just adjusted the syntax and declarations to be compatible, and added a framework to run it in parallel threads using backgroundworkers.
I wrote and compiled it on a Core2Duo E7400. 2 cores 2 threads. So the calculations run on it in 2 parallel threads. And it seems relatively OK, it runs as I'd expect on this CPU.
Then I took the compiled program to a computer with an W3690 Xeon CPU, 6 cores 12 threads. And the program runs like a dead sloth on this. It starts running on 12 threads all right, and CPU usage is over 90%, but each thread takes like 15x longer to process the same amount of data than on the Core2. And it's not the IO operations, those take very little time, it's the actual calculations that take this long.
What could be the issue?
I haven't changed anything about the code, just adjusted the syntax and declarations to be compatible, and added a framework to run it in parallel threads using backgroundworkers.
I wrote and compiled it on a Core2Duo E7400. 2 cores 2 threads. So the calculations run on it in 2 parallel threads. And it seems relatively OK, it runs as I'd expect on this CPU.
Then I took the compiled program to a computer with an W3690 Xeon CPU, 6 cores 12 threads. And the program runs like a dead sloth on this. It starts running on 12 threads all right, and CPU usage is over 90%, but each thread takes like 15x longer to process the same amount of data than on the Core2. And it's not the IO operations, those take very little time, it's the actual calculations that take this long.
What could be the issue?