10

When I run htop in Bash on Windows I get the following output regarding CPU usage: enter image description here while the Windows Task Manager shows around 1% usage.

From here it's clear that htop's red regions are supposed to mean CPU usage by kernel threads, and green is for normal priority threads.

In the case of Bash on Windows it currently seems that the green is the actual CPU usage, but what does the red mean? Does it possibly represent a maximum limit of what the Windows-Linux subsystem can use, or is it merely a display bug, in which case why does it specifically show 50% usage for each CPU/hyperthread?

3 Answers 3

2

I have the same exact issue:

htop

As you can see I only have htop running and it barely uses 1.0% of CPU, on Windows I'm below 10% CPU usage while doing this. Even worse is that Thread 4 always has a green bar way bigger than the others. The percentage of all of them is always between 50-60%.

I believe it's an issue of implementation or just a bug, remember "bash on Windows" is still in beta. If someone knows a fix or at least a workaround that would be good.

Additional info regarding bash and potential issues during the beta: https://msdn.microsoft.com/en-us/commandline/wsl/about?f=255&MSPPError=-2147217396 (read the Important note)

0
1

There is a pretty simple explanation. Bash on windows does not have access to the CPU data of the hosting windows machine. Therefore, output of top, htop or whatever you are planning to use until Microsoft solves this issue will not show you real CPU usage.

0

My guess would be "System Idle Process" in Details in task manager. That's probably a kernel level process and it takes up the rest of my CPU that's not being used. Maybe htop is getting confused with it.

See: https://en.wikipedia.org/wiki/System_Idle_Process

3
  • 1
    But why would that be exactly 50%, distributed among all cores evenly?
    – MWiesner
    Aug 5, 2016 at 0:15
  • He got lucky with the screenshot? It varies quite drastically on mine, but hovers around 40-60% Maybe it has something to do with how htop calculates the CPU usage. askubuntu.com/questions/15620/… Aug 6, 2016 at 6:54
  • Not specific to htop, top shows the same. E.g start top and press 1.
    – Zitrax
    Oct 7, 2016 at 20:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .