MATLAB Answers

Anton
0

g2020 + gpu +16gb ram OR i5 +8gb ram for matlab

Asked by Anton
on 16 Apr 2013
Currently need to upgrade my system to get better performance in matlab(currently running on dual core laptop with 4gb). an 8gb upgrade (for laptop) would cost me half of the new system (!) so i figured might as well build a new one from scratch.
I have heard matlab is mostly single threaded unless you use specific functions/parrallel computing toolbox(is this right or have i got wrong info?)?
From my understanding the i5 would beat the g2020 any day (this set up is purely for matlab since that will be the most demanding application on this.), but performance wise
would a g2020 + gtx 650 or similar (with parrallel computing toolbox, to allow gpu to process data) be better than
i5 3570k (stock) + hd 4000 (with or without the toolbox)?
The price for the 2 setups is identical (i5 is 10£ cheaper overall), shall i go for i5 anyway?
Most of my matlab code runs fine (as in it doesnt crash but uses 100% for a while) on a dual core , but the 4gb of ram is holding me back (frequently use swap which slows things down). The mb supports (will support) up to 32 gb, has anybody had any improvements going from 8gb to 16gb ram?
Seems to me that the i5 is a better choice as i can always add a gpu if need be.
Suggestions/criticism welcome
Thanks

  0 Comments

Sign in to comment.

2 Answers

Answer by Jason Ross
on 17 Apr 2013

I would go the i5 + RAM route if you are already reasonably satisfied with the performance on your existing machine. I'd really go for the 16 GB, as the cost difference between 8 GB and 16 GB is not really all that large (nearly on the order of that extra 10£, right?), and if you can do 32 GB -- do it. It's exceptionally nice when you don't need to worry about hitting swap.
Keep in mind that for parallel and GPU computing there are certain functions which do work on the GPU and in parallel, and you may need to modify your code to use these devices. A straight hardware upgrade to more RAM to eliminate your current bottleneck will liklely be the best value.
As for single/multi threaded, performance depends on what functions you use. Some may take advantage of threading, some may not, and there is some overhead in using parallel computing, either using multiple MATLABs or the GPU -- so it's not something that automatically guarantees better performance in all cases.
If you are considering adding a GPU later, make sure the power supply in the box can deal with a device that can pull 200 W under heavy use.

  2 Comments

Actually in my case 16gb of ram is more than double the cost (50£ vs 110£,), if it becomes more equivalent i will definitely get 16gb. As I said before the mb will support up to 32gb anyway(so i can always put in 2 x8gb sticks as an upgrade), bearing in mind i am coping with 4gb then 8 should be a nice speed boost,ye?
The code is mostly matrix algebra, and graphs (3d surface graphs etc etc) but with 1E+06 data points,so ram runs out quite quickly even on simple tasks.
Would the hd4000 be acceptable for matlab performance or would i need a gpu ?
Current gpu is a mobile 4570 amd, which is by no means powerful.
What if you do 4x4GB instead of 2x8GB if that motherboard will support it?
As Jan says, if you can keep everything in RAM you are going to get the largest benefit. Once you remove a bottleneck, you'll find a new one.
As for the display card, MATLAB can take advantage of OpenGL if the card supports it, which is pretty common nowadays, even on cards that aren't expensive. I'd check the specs on the cards you mention.

Sign in to comment.


Answer by Jan
on 17 Apr 2013

It cannot be decided, how many RAM you need, when it is not clear, how large the processed data are. When the 4GB are exhausted and 1 further GB is swapped to the hard disk, 8GB RAM will let the speed explode. If 3.5GB are swapped to the hard disk, even with 8GB RAM the computer will swap from time to time depending on the fragmentation of the RAM. So if you can afford 16 GB, it is a really good idea to install them.

  0 Comments

Sign in to comment.