Message Boards Message Boards

0
|
4635 Views
|
1 Reply
|
2 Total Likes
View groups...
Share
Share this post:

CPU Utilization never exceeds 13% for graphics??

Posted 9 years ago

I am running a few slightly complicated graphics. When these run for a while, it appears that the CPU utilization (for the front-end and back-end) never exceeds 13%.

But when I run a "pure calculation", it goes up to 60% (back-end). The calculation in this case is a LinearSolve[] of a 100-by-100 RandomInteger[] of mx=b.

Is there some setting to make the system use more resources to complete faster when resources are available?

My machine is Win8.1, Mma 10.1, 3.5Ghz, 4Cores, 32GB memory.

No other applications are running on the machine during these tests.

Thanks in advance.

Ref: notebook with small graphic and pure calculation

Attachments:
POSTED BY: Aeyoss Antelope
Posted 9 years ago

The reason is that LinearSolve by default parallelizes computations while other functions involved can use only one thread. So when you run almost pure LinearSolve code it uses 4 threads and you get 50% processor load by MathKernel (because you have 8 virtual cores due to hyperthreading). When you run your "graphical" code MathKernel uses only one core and the actual processor load is 1/8 = 0.125. You can get significant speedup simply by replacing Table with ParallelTable:

Graphics[{Thickness[0.001], 
       ParallelTable[{Hue[Random[]], Line /@ 
             Nest[Flatten[RandomSpike /@ #1, 1] & , 
               startTriangle, 4]}, {48}]}] // Timing
POSTED BY: Alexey Popkov
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract