Low number of running actions when building in a windows docker container

80 views
Skip to first unread message

Luc Bertrand

unread,
Oct 5, 2021, 11:34:06 AM10/5/21
to bazel-discuss
Hi everyone,
I'm struggling with Bazel running in a Windows Docker Container.

When running bazel build I get 16 actions, but only 1 or 2 maximum are running in parallel. The others are [Sched].

I checked the number of cpu visible by the container and I get: 

wmic cpu get /Format.List
...
NumberOfCores=8
NumberOfEnabledCores=8
NumberOfLogicalProcessor=16
...
ThreadCount=2

The windows container sees 16 logical cores (8 physical cores).  but only 2 Threads (when it's 16 on the host), I guess that could be the reason.

But then I tried to check in bazel codebase how it detects the number of cpus, and it seems that it uses Runtime.getRuntime().availableProcessors() from java.

And according to a small Main.java I wrote, Runtime.getRuntime().availableProcessors()  returns 16 in my docker instance.Hence I don't understand why I'm still stuck with 2 actions running in parallel ....

Any ideas ?

Thanks !
Reply all
Reply to author
Forward
0 new messages