Matlab and Hyperthreading/Dual cores

  • Context: MATLAB 
  • Thread starter Thread starter 600burger
  • Start date Start date
  • Tags Tags
    Matlab
Click For Summary
SUMMARY

This discussion centers on the performance of MATLAB with hyperthreading (HT) and dual-core processors. Users noted that MATLAB, particularly version R2007a, does not effectively utilize multiple threads, leading to only 50% CPU usage on HT processors. It was clarified that hyperthreading and dual-core processors function differently, and MATLAB's architecture may not benefit from dual-core upgrades as expected. The conversation highlights the limitations of MATLAB's threading capabilities and the potential inefficiencies introduced by synchronization locks in multi-threaded applications.

PREREQUISITES
  • Understanding of MATLAB R2007a and its threading capabilities
  • Knowledge of hyperthreading and dual-core processor architectures
  • Familiarity with computational fluid dynamics (CFD) applications
  • Basic concepts of multi-threading and performance optimization
NEXT STEPS
  • Research MATLAB's multi-threading capabilities in versions beyond R2007a
  • Explore performance optimization techniques for CFD simulations in MATLAB
  • Learn about the differences between hyperthreading and dual-core processing
  • Investigate synchronization mechanisms in multi-threaded applications
USEFUL FOR

Engineers, researchers, and developers working with MATLAB for CFD simulations, as well as those interested in optimizing performance on multi-core processors.

600burger
Messages
63
Reaction score
0
I recently noticed while crunching some CFD numbers in Matlab that only 50% of my HT processor is being used. I understand basically that HT is an early imitation of dual core. I assume if i turn off HT i will regain my lost cycles.

My question is regarding an invedible upgrade to my rig, which in this day and age most likely means dual core. Does MATLAB take the same "hit" from dual core?

-Thanks!
 
Physics news on Phys.org
600burger said:
I recently noticed while crunching some CFD numbers in Matlab that only 50% of my HT processor is being used. I understand basically that HT is an early imitation of dual core. I assume if i turn off HT i will regain my lost cycles.
No cycles are lost. A dual core processor and hyperthreading are two different things.

600burger said:
My question is regarding an invedible upgrade to my rig, which in this day and age most likely means dual core. Does MATLAB take the same "hit" from dual core?
Matlab was not designed as a multi/threaded application, which I think is rather embarrasing. Version R2007a seems to allow some multiple threads but I am not sure if this was some kind of a hack or an elegant redesign. Note that just because an application is called multi threaded that does not mean it´s throughput increases linearly with multiple cores. Every application can be made multi threaded with tons of synchronization locks which in the end can even make it slower instead of faster.

I found a document that gives a summary http://www.mathworks.com/support/solutions/data/1-372IPG.html?1-372IPG"
 
Last edited by a moderator:
A hyperthreaded processor has two execution contexts (i.e. it appears to the outside world to have "two processors") yet has only one processor's worth of function units. In other words, when one context is using part of the chip -- say, an adder -- the other context cannot.

In certain kinds of situations, when you're running two programs which do very different things, there may not be much competition for function units, and your programs may well run much faster.

On the other hand, when you're running a single thread on a single context, or running two programs which need the same function units, you will not see any improvement at all.

- Warren
 

Similar threads

Replies
3
Views
5K
  • · Replies 3 ·
Replies
3
Views
15K
Replies
2
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 25 ·
Replies
25
Views
8K
Replies
3
Views
9K
Replies
14
Views
11K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 6 ·
Replies
6
Views
4K