MATLAB by MathWorks is a highly advanced platform for performing complex data analysis and powering design processes. Leveraging the impressive capabilities of its programming language MATLAB performs calculations and manipulations of vast datasets formatted as matrix and mathematical arrays.
The possibilities these techniques provides are vast, helping data scientists develop programs and algorithms for deep learning, facial recognition, robotics and financial risk analysis to name but a few. Working with large datasets takes tremendous amounts of computing resources and getting results in near real-time can be essential for your application to perform effectively.
Over the years, we have built up extensive experience helping data scientists achieve the maximum performance from their programs and algorithms by combining them with optimised tailored hardware solutions. Below we share some of our findings and discuss the general principles of configuring a highly optimised computing platform for accelerating your MathWorks MATLAB projects.
If you are interested in speaking to a professional directly about your specific requirements, contact our highly trained consultancy team today at (+44) 0800 180 4801 or firstname.lastname@example.org.
What is the best processor for MathWorks MATLAB?
Often referred to as the brain of a computer it is not surprising then that the Central Processing Unit (CPU) is one of the most critical components for a data scientist using MATLAB. In most cases, a CPU containing more cores will be a significant benefit to users. MATLAB is a highly capable multi-threaded platform that can perform mathematical computations in parallel; therefore, the more cores you have working at the same time, the better your performance.
Some processes are only single-threaded, and in these cases, lower core count Processors with high clock speeds will be your better options. Single-threaded tasks in MATLAB are more the exception than the rule. Check your windows task manager or systems resource monitor while running your MATLAB projects to confirm if your projects run on a single core or multiple cores. With this in mind, we generally recommend a high core count processor option such as the AMD EYPC, AMD Ryzen Threadripper and Intel Dual Xeon workstation/server ranges.
When selecting your processor, please keep in mind that MATLAB does not support virtual cores such as the Intel hyperthreading technology, and only physical cores will work. This limitation is why when monitoring a program such as Windows task manager it often appears that MATLAB is only using half the cores/threads available to the system.
How much memory does MATLAB need?
Not having enough memory in your system significantly reduces your performance because it leads to a process known as paging out. Your systems Random Access Memory (RAM) is by far the fastest storage device in your system and is essential for communicating with your CPU during processing.
If not enough memory is available your system will have to store data back to your slower Hard Disk Drives (HDD) or Solid State Drives (SSD) meaning, your CPU is regularly waiting for data rather than processing it. On the other hand, having too much memory will not increase performance and can be costly. In this case, it would be wiser to invest your budget in upgrading the systems CPU.
The specific amount of memory required for MATLAB can vary dramatically from project to project. A general rule of thumb would be about a minimum of 32GB going all the way up to 256GB+ for very memory intensive workflows. You can check your memory usage of your projects by using your systems resource monitors or running memory() in your code.
Best Storage Configuration for MATLAB?
Hard drive speed is only a significant factor for loading your MATLAB project. Once loaded MATLAB generally runs directly from memory to maximise performance. If however, your project uses large amounts of stored assets that cannot reliably fit into memory such as processing on an extensive collection of images, then storage drive performance will be critical to overall performance.
NVMe Solid State Drives (SSD) are currently the fastest drives available on the market today. We recommend that your operating system, application and project files be stored on one of these drives to maximise performance. If the cost is a bit too high for your budget, then a SATA based SSD will also provide excellent performance.
It may be worth considering a 2nd SSD to store project resources such as images, audio and data files. By separating these files onto a secondary drive, you can ensure that you do not hinder processing by other activity happening on your primary SSD.
A traditional HDD may be a consideration for very large datasets and long-term storage. They do not offer the same performance as an SSD in terms of speed, but they do offer higher storage capacities at a significantly reduced comparative cost.
What is the best graphics card for MATLAB?
Depending on the workflow of your application, the importance of your Graphical Processing Unit (GPU) can vary dramatically. If your program is CPU based then a relatively low-end graphics card that supports OpenGL to power your displays will be adequate.
If however, you plan to take advantage of the GPU acceleration options within MATLAB then a more powerful graphics card or multiple cards will be required. The MathWorks MATLAB Parallel Computing Toolbox takes advantage of the huge performance acceleration GPUs provides to compute/analysis workflows. We recommend NVIDIA Quadro graphics cards for workstations and the NVIDIA Tesla range for rackmount servers supporting compute capability 3.0 or higher to guarantee compatibility and stability.