I've searched many questions about parallel processing here, and they are either specialized or over my head. I run the following parallel notebook on an 8 core EC2 instance. The average memory usage is ~40% of 32GB and the CPU utilization is ~50%. Using "CoarsestGrained" does not help. Why is it not maxing out the system capacity?

mccount = 10^6;
cyclesperday = RandomVariate[LogNormalDistribution[-0.9, 1.3], 635554];
samplemanycyclesper5years = 
   Total[RandomChoice[cyclesperday, 1826]], {100*mccount}];
cycledatatofit = Partition[samplemanycyclesper5years, 100];
samplecycledistributions = 
    LogNormalDistribution[\[Mu], \[Sigma]]], {i, 1, mccount}];
  • 2
    $\begingroup$ 50% CPU utilization probably means quite exactly 100% CPU utilization for numeric purposes. For example, macOS measures only 100% if hyperthreading is used. But hyperthreading is contraproductive for numerical operations so Mathematica deactivates it. See also this post. $\endgroup$ Jun 22 '18 at 21:45
  • 1
    $\begingroup$ Also related. $\endgroup$ Jun 23 '18 at 8:16
  • 1
    $\begingroup$ LaunchKernels@8 $\endgroup$
    – Fortsaint
    Dec 10 '18 at 22:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.