Community
cancel
Showing results for 
Search instead for 
Did you mean: 
novickivan
Beginner
52 Views

Unexplained Performance Numbers on Xeon X5550 With Hyperthreading

Hello,

I have a simple little C programs that forks 1-16 processes. In each process it does a loop incrementing a counter and then exits. The main program waits for all forks to end.

When I run this program with 1 process it takes 41 seconds to complete and with 16 processes it takes 23 seconds to complete all of them in total.

To me I can not see how 16 instances of the same programs can reliably finish faster than 1 instance.

Any theories would be welcome.

Cheers,

Ivan Novick

0 Kudos
2 Replies
novickivan
Beginner
52 Views

Hi,

I fixed a bug in the code, and also tried to make it harder for the compiler to optimize away the logic, but the results are the same. It is faster to run 16 instances than to run 1 instance.

Updated code is attached.

Cheers,

Ivan Novick

novickivan
Beginner
52 Views

Hello,

I think I have found my problem is related to cpu frequency scaling in the kernel. Looking into it.

Cheers,

Ivan

Reply