Hello,
I have a problem with Matlab that it is too slow. My PC has 16GB RAM and the version I am using is 2021a.
I have checked the same code with another computer and it run the code much faster.
The CPU utilization shows in PC as 7-10% and if I test the same code in different computer it is like 60-65%.
And when I run 'bench' in matlab it shows my PC is having longest execution time than the other machine I tested my code though which is apperently bad in terms of properties compared to my PC.
Can anyone answer why this is happening ?

댓글 수: 3

Steven Lord
Steven Lord 2022년 3월 3일
With the information you've given, no. You haven't told us what your code is doing.
It could be that the computation isn't the bottleneck, the bottleneck is reading your data files from a (slow) drive on this machine and a faster drive on the other.
It could be the other machine has enough memory it doesn't need to swap while this one does.
Do both machines have the same number of physical cores to perform equivalent multithreading?
Or it could be that the computations are slower on your machine. Without looking at the code there's no real way to know.
As for he bench results, show them. The bench function weights the computation and graphics tests equally, and often machines are lower on the list because the perform the 2D and 3D tasks more lowly than others they match on the numerics tasks.
Upeksha Kankanamge
Upeksha Kankanamge 2022년 3월 4일
Hello,
Thank you very much for your response Steven.
We could configure some major issues which had with PC settings and improve the performance. In my code, first I am trying to first read some json files from folders, and after that process it through fft , conv etc.
After the changes, the CPU utilization has improved upto 48-55% in PC. In both cases, matlab was the only software running. PC has 4 cores and laptop has 2 cores.
The properties of the other machine (a laptop) are
Matlab 2017b installed in laptop.
After the changes the bench results are: top picture is for PC and bottom picture is for laptop
Benjamin Thompson
Benjamin Thompson 2022년 3월 4일
What type of GPU is in both computers? If one has a GPU supported by MATLAB, the fft and conv processing could go to the GPU but not on a machine with an unsupported GPU. This could explain why one is much faster or uses the CPU less. You should also make sure background processes like backup and antivirus are not interfering with test results.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

태그

질문:

2022년 3월 3일

댓글:

2022년 3월 4일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by