Yes, in VirtualBox on this machine I have Processors set to 4 and the 
Execution Cap set to 100% (i.e., no limit). I've also tried it on a real 
Windows 7 machine which has 2 cores & that only uses 1 thread and I've 
tried it on another VirtualBox, again it only uses 1 thread.

I've now tried the du4 example from "The Go Programming Language" book. My 
code is based on this example, but whereas du4 briefly peaks at 70-80% CPU 
my own code never exceeds 50%. So I guess the problem is with my code:-(

On Monday, February 27, 2017 at 6:59:11 PM UTC, Guillermo Estrada wrote:
>
> Are you sure your virtual machine has 4 cores assigned? You might have 4 
> cores, but when you create the VM you can assign any number of cores to it 
> (1 being default IIRC).
>
> On Monday, February 27, 2017 at 12:39:31 PM UTC-6, Mark wrote:
>>
>> I just tried this on an old Windows 7-32bit machine which reports 
>> GOMAXPROCS of 2 but only one is ever used.
>>
>> On Monday, February 27, 2017 at 5:32:17 PM UTC, Mark wrote:
>>>
>>> I have a Go app that only uses 1 thread when GOMAXPROCS is 4 on Windows 
>>> 7-64bit inside VirtualBox even though I can have up to 20 goroutines. Is 
>>> this a known problem? And is there a solution that can force Go to use all 
>>> 4 CPUs? (The underlying hardware is a 64-bit i7.)
>>> Thanks.
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to