Processor A is twice as fast in a totally sequential case.
Processor B is twice as fast in a totally parallel case.
crabcake
Prefer process B for high parallel program like web server for near 2 times throughput.
bazinga
Usecases for the two processors:
Processor A: A single threaded program runs at performance P on A as against P/2 on B.
Processor B: A web server runs at performance 8P on B as against 4P on A
holard
How about the in-between cases, i.e. when we can utilize up to 8 parallel threads? Does the (potentially) lower communication overhead of processor A cause it to win in this case?
manishj
For the case you mentioned, I believe Processor A should be used because in Processor B, we will be wasting half of the cores.
vasua
This issue comes up a lot in practice when building a custom PC, for example. Many high end PCs are specialized for gaming, but people often fail to understand the workload that games are. Modern games require fast, single core performance far more often than they require fast multithreaded performance, as many games do not make much, if any, use of multiple cores on a system. People often spend unnecessary money upgrading from, say, an i5 to an i7 to gain additional cores via hyperthreading, and are confused why they see no performance gains in daily usage. That money could have been better spent buying a better GPU.
vadtani
@manishj wouldn't A have an overhead of context switching?
kayvonf
@vadtani. You are assuming that the application has a fixed number of threads (say 16). However, as we know from class it often makes sense to spawn only as many threads as one needs to fill the machine (and not more...to avoid overheads like cache thrashing, and context switching). So if I had a parallel workload I would implement it using four threads if running on processor A.
Processor A is twice as fast in a totally sequential case. Processor B is twice as fast in a totally parallel case.
Prefer process B for high parallel program like web server for near 2 times throughput.
Usecases for the two processors:
Processor A: A single threaded program runs at performance P on A as against P/2 on B.
Processor B: A web server runs at performance 8P on B as against 4P on A
How about the in-between cases, i.e. when we can utilize up to 8 parallel threads? Does the (potentially) lower communication overhead of processor A cause it to win in this case?
For the case you mentioned, I believe Processor A should be used because in Processor B, we will be wasting half of the cores.
This issue comes up a lot in practice when building a custom PC, for example. Many high end PCs are specialized for gaming, but people often fail to understand the workload that games are. Modern games require fast, single core performance far more often than they require fast multithreaded performance, as many games do not make much, if any, use of multiple cores on a system. People often spend unnecessary money upgrading from, say, an i5 to an i7 to gain additional cores via hyperthreading, and are confused why they see no performance gains in daily usage. That money could have been better spent buying a better GPU.
@manishj wouldn't A have an overhead of context switching?
@vadtani. You are assuming that the application has a fixed number of threads (say 16). However, as we know from class it often makes sense to spawn only as many threads as one needs to fill the machine (and not more...to avoid overheads like cache thrashing, and context switching). So if I had a parallel workload I would implement it using four threads if running on processor A.