Performance issue (CPU usage)
7 次查看(过去 30 天)
显示 更早的评论
The matlab i'm using is 2010a.
1. I start up a .m file, but find the CPU cost is too low, only 1% on average in windows task manager. Is there any method to speed up it?
2. What is the difference in terms of performance between running a script by typing the file name in command window and running it by click ctrl+enter?
0 个评论
回答(2 个)
Jason Ross
2012-3-29
It is entirely speculative without seeing what's going on in your code. The condition that springs to mind immediately would be that you are loading data from a (slow) remote file server and you are waiting on the load to complete.
5 个评论
Jason Ross
2012-3-30
Pulling 2 GB from local disk shouldn't take too much time. I'm making an assumption that you have a reasonably modern drive interface in a system with 90+ GB of RAM, as well as some quick storage.
Are you processing the data in some way as you are loading it? Perhaps you could tell us how you are loading it (post the code). I know there are some people on here who have a lot of experience with the various means of importing data, there are some that can be quicker than others, but there are trade-offs.
Geoff
2012-3-30
You have over 90GB of RAM???? Do you mean disk space? How much RAM do you actually have?
I would say if you're running a 32-bit MatLab or if you have less than 3 or 4 GB RAM, then your dataset will be paged into virtual memory.
If the processing you do on that data involves a lot of random access you could be page-faulting furiously. The processor will do almost nothing and your disk will be going nuts.
Bring up the Task Manager, show processes and highlight MatLab. Click View -> Select Columns, then make sure "Page Faults" is checked. Run your script and watch the Page Faults. If that number is climbing rapidly, it will indicate a lack of physical memory.
3 个评论
Geoff
2012-4-1
I assume you are running a 64-bit operating system AND 64-bit MatLab? What is the output of the command 'memory' when you enter it into the command window in MatLab?
Image Analyst
2012-4-1
It IS possible -- On some Dell workstations you can add 96 GB or even "192GB, DDR3 RDIMM Memory, 1066MHz, ECC (12 DIMMS) [add $23,720.00]" A bit out of my price range or need.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 MATLAB Parallel Server 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!