Choosing a Computer to Run MATLAB and Simulink Products

Predicting how MATLAB will perform while running an application on a particular computer is difficult. MathWorks offers this general guidance on platform selection criteria and emphasizes that it is not a substitute for testing your application on a particular computer.

Contents


开放的rating Systems

MATLAB performance is similar on Windows®, Mac OS®X, and Linux®, although differences can occur among platforms for the following reasons:

  • MathWorks builds its products with a different compiler on each platform, and each has its own performance characteristics.
  • MathWorks incorporates third-party libraries into its products that may perform differently on each platform.
  • The operating systems perform differently, especially in the case of disk- or graphics-intensive operations.

In general, performance differences in operating system releases (for example, between Windows 7 and Windows 8) are negligible.


Hardware Considerations

Each component of a typical computer configuration has an impact on MATLAB performance.

Central Processing Unit (CPU)

Computers withmore CPU corescan outperform those with a lower core count, but results will vary with the MATLAB application. MATLAB automatically uses multithreading to exploit the natural parallelism found in many MATLAB applications. Butnot all MATLAB functions are multithreaded, and the speed-up varies with the algorithm. For additional capability,Parallel Computing Toolboxoffers parallel programming constructs that more directly leverage multiple computer cores.

MATLAB performance is dependent on the presence of floating-point hardware. On many CPUs, the number of Floating-Point Units (FPUs) equals the number of CPU cores. However, on some processors, a single FPU may be shared between multiple CPU cores, potentially creating a performance bottleneck.

Virtual coresmay modestly improve overall system performance, but they are likely to have little effect on the performance of MATLAB applications. Simultaneousmultithreadinggives the appearance that a computer has twice as many cores than it actually has. When using a tool such as Windows Task Manager, MATLAB may appear to use only half of the CPU cores available on the computer, when in fact the "unused" half is actually the virtual cores created by hyper-threading.

内存

Your computer can sufferperformance degradationdue tothrashingwhen MATLAB and the programs you run concurrently with it use more than the available physical memory and your computer must resort to virtual memory. If, while running a MATLAB application, you find your computer is using little of the CPU, you may be experiencing thrashing. To detect thrashing on a Windows platform, useWindows Performance Monitor. On a Mac, useActivity Monitor.

Hard disk

The hard disk speed is a significant factor in MATLAB start-up time. Once MATLAB is running, disk speed is only a factor if a MATLAB application's performance profile is dominated by file I/O, or if your system is using virtual memory (see内存section). For disk-intensive MATLAB applications or to improve the start-up time of MATLAB, you can take advantage of technologies such assolid-state drivesorRAID.

Graphics Processing Unit (GPU) for display

MATLAB Graphics are rendered using OpenGL technology, so a graphics card with superior OpenGL support can outperform a lesser card. Up-to-date drivers are recommended for the best visual appearance and robustness.

Graphics Processing Unit (GPU) for computation

Tospeed up computation,Parallel Computing Toolboxleverages NVIDIA GPUs with compute capability 3.0 or higher. For releases R2017b and earlier, compute capability 2.0 is sufficient. For releases R2014a and earlier, compute capability 1.3 is sufficient.

See the compute capabilities of all NVIDIA GPUs. MATLAB does not support computation acceleration using AMD or Intel GPUs at this time.


Benchmarking Your Program

MATLAB provides abuilt-in benchmarking utilitycalledbenchthat provides a general sense of MATLAB performance on a particular computer, but it cannot reliably predict how any particular MATLAB application will run. Use the MATLAB functiontimeitto help produce reliable and repeatable performance benchmarks. Usegputimeitto benchmark GPU code.