Path: news.mathworks.com!not-for-mail
From: "Ashish Uthama" <first.last@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Force 100% CPU usage
Date: Tue, 03 Nov 2009 13:42:38 -0500
Organization: TMW
Lines: 69
Message-ID: <op.u2t0xcgta5ziv5@uthamaa.dhcp.mathworks.com>
References: <h06dov$egu$1@fred.mathworks.com>
 <h0ckgo$1mn$1@fred.mathworks.com> <hcpt6i$r1h$1@fred.mathworks.com>
NNTP-Posting-Host: uthamaa.dhcp.mathworks.com
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15; format=flowed; delsp=yes
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1257273759 21755 172.31.57.126 (3 Nov 2009 18:42:39 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 3 Nov 2009 18:42:39 +0000 (UTC)
User-Agent: Opera Mail/10.01 (Win32)
Xref: news.mathworks.com comp.soft-sys.matlab:582127


On Tue, 03 Nov 2009 13:36:02 -0500, Prashanth Kumar   
<prashanth.chinta@gmail.com> wrote:

> "Bobby Cheng" <bcheng@mathworks.com> wrote in message  
> <h0ckgo$1mn$1@fred.mathworks.com>...
>> That depends on what your application is doing. I sincerely hope that
>> spinning the cores 100% is not the only goal here. I hope you just want  
>> the
>> MATLAB program runs faster.
>>
>> Have you profile your code? Do you know where the bottle neck is?
>>
>> If the bottleneck happens to be parallelizedable, or you expect it to be
>> able to be parallelized, please contact our supoort and let us know.  
>> These
>> are invaluable feedback we like to hear everyday.
>>
>> Asking a general statement like your post makes this very difficult to  
>> give
>> any useful answer. Without knowing specific problems, I cannot say if  
>> the
>> problem would benefit from using multicore.
>>
>> Do you have any particular set of functions in mind?
>>
>> ---Bob.
>>
>> "Richard Underwood" <Richard.Underwood@hotmail.com> wrote in message
>> news:h06dov$egu$1@fred.mathworks.com...
>> >I have some engineers running batch files on Windows XP 32bit, but  
>> they are
>> >only taking up 25% of the Quad core processor.  Is there a way to force
>> >MatLAB to use up 100% of the CPU?
>> >
>> > Could this be a code problem within the batch files?
>>
>
> Dear Bobby Cheng,
> I have the similar problem. I first invoked(on intel  xeon quadcore  
> processor) 'matlabpool 4' than it showed that it has connected to 4 labs  
> on a default 'local' config. Than i run simple program where i used  
> 'parfor' loop. But the cpu's are not utilized at their full strength.  
> Only 50% to 60% of cpu strength has been utilized? Why's this so? Is  
> this a problem of licenses? How can we get 100% cpu usage for faster  
> computation.
>
> Thank you
> Prashanth

Prashanth,

Maybe the code you are running is not CPU bound. Though you have four  
process running, they might not each need 100% of the CPU computing power  
at the same time. Quite a bit of time goes in IO and waiting on other  
resources.

You could try using MicroSofts's 'process explorer' tool to study the CPU  
utilization of each of your MATLAb worker individually. I have a feeling  
you would notice that it doesnt need the amount of CPU power you are  
expecting.

You could try increasing the number of Workers, you might see a better  
utlization. BUT ..this might not correspond to a better overall  
performance (there would be point of diminishing returns with increasing  
workers dependent on machine configuration, memory, swap, the type of code  
you are running,etc..etc)