WSL Ubuntu 18.04 shows wrong Cpu_allowed mask
0
votes
0
answers
332
views
Ubuntu 18.04 running under WSL detects my CPU wrong:
$ cat /proc/self/status | grep Cpus_allowed
Cpus_allowed: 00000001
The CPU is an i7-4510U (2 cores/4 threads) so I expected:
Cpus_allowed: f
or similar (ff, ffffffff, 0000000f).
The peculiar thing is that when I run 4 processes, each process gets a CPU thread, and thus runs at 400% CPU utilization. So it is as if the CPU mask is not respected.
Also
taskset
is not respected. This should use a single thread (100%), but it uses all 4 (400%):
taskset 2 parallel -j4 'bzip2 ' ::: {1..10}
Is this a bug - possibly in WSL? And if so: Where do I report it?
**Background**
The problem described on https://arstechnica.com/civis/viewtopic.php?f=15&t=1442563 is explained by the above: GNU Parallel detects the wrong number of CPU threads because it looks at the CPU mask in /proc/*/status
to determine how many CPU threads it is allowed to use.
Asked by Ole Tange
(37348 rep)
Mar 29, 2019, 10:20 AM
Last activity: Mar 30, 2019, 09:11 AM
Last activity: Mar 30, 2019, 09:11 AM