<div dir="ltr">Thanks Justin for the perspective! <div><br></div><div>This 'thread' has helped me a lot in understanding some aspects of the ins and outs of using more cores and more threads. </div><div><br></div><div>Comer</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 25, 2016 at 6:07 PM, Justin C. Walker <span dir="ltr"><<a href="mailto:justin@mac.com" target="_blank">justin@mac.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
On May 25, 2016, at 14:42 , Adam Dershowitz wrote:<br>
<br>
><br>
><br>
><br>
>> On May 25, 2016, at 5:25 PM, Brandon Allbery <<a href="mailto:allbery.b@gmail.com">allbery.b@gmail.com</a>> wrote:<br>
>><br>
</span><span class="">>> On Wed, May 25, 2016 at 5:22 PM, Christopher Jones <<a href="mailto:jonesc@hep.phy.cam.ac.uk">jonesc@hep.phy.cam.ac.uk</a> <mailto:<a href="mailto:jonesc@hep.phy.cam.ac.uk">jonesc@hep.phy.cam.ac.uk</a>>> wrote:<br>
>> you don’t. Its automatic for the ports that allow it.<br>
>><br>
>> And this is also true, if that was not clear. Using multiple cores is *on by default*. You are already getting it, unless you at some point in the past overrode buildmakejobs in macports.conf.<br>
>><br>
>> --<br>
><br>
><br>
> You can also manually change it for a single install, for example by using <a href="http://build.jobs" rel="noreferrer" target="_blank">build.jobs</a>. Such as:<br>
> sudo port install port_whatever_name <a href="http://build.jobs" rel="noreferrer" target="_blank">build.jobs</a>=4<br>
> and then, for that specific install it will attempt to use 4 cores. This can be handy to reduce the number of cores used, from the default, so that you can do other things on the machine while building.<br>
<br>
</span>FWIW, you can also increase the "thread count" because each core in modern Macs provide two "hyperthreads" per core. It's almost like getting two cores per core, but there are various architectural limitations in getting "full throttle" performance (memory bandwidth, ...).<br>
<br>
Also, to see this in action, you can use the Activity Monitor, and invoke "Window -> Floating CPU Window -> {Horizontal, Vertical, None}". This gives you a sort of histogram view of per-hyperthread activity.<br>
<br>
I regularly build SageMath on Macs, and usually max out the thread count. There can be issues with this. I've had my systems tie themselves up in what appear to be resource knots, but I've never tracked down the real cause (the apps I use to see what goes on get stalled when this happens). Sometimes the system doesn't recover, but mostly, it does.<br>
<br>
HTH<br>
<br>
Justin<br>
<br>
--<br>
Justin C. Walker, Curmudgeon-At-Large<br>
Institute for the Enhancement of the Director's Income<br>
--------<br>
Experience is what you get<br>
when you don't get what you want.<br>
--------<br>
<br>
<br>
<br>
</blockquote></div><br></div>