At the time of this writing
htop shows two cores at about 50% each in kernel threads (red bars). From previous boots I know, that this will increase to 3 and even 4 cores at 50% each over time. No thread that htop shows has any cpu usage above 1%. This is kind of strange isn't it?
I tried to investigate it further and using
perf record -a as root I found that 11.3% of all samples were in a kernel thread of the command
swapper in the function
I will assume that this
swapper command corresponds to the strange cpu occupation I see in htop, but can somebody explain to me some of the following questions:
- what caused this? Is it a bug or something with my settings?
- does this impact the overall performance of my system?
- how can I get rid of this?
some more details about my system:
$ uname -a Linux [...] 4.8.0-0.rc2.git2.2.fc26.x86_64 #1 SMP Wed Aug 17 22:16:04 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux $ lscpu Architecture: x86_64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 8 On-line CPU(s) list: 0-7 Thread(s) per core: 2 Core(s) per socket: 4 Socket(s): 1 NUMA node(s): 1 Vendor ID: GenuineIntel CPU family: 6 Model: 94 Model name: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz Stepping: 3 CPU MHz: 799.804 CPU max MHz: 4200.0000 CPU min MHz: 800.0000 BogoMIPS: 8016.00 Virtualization: VT-x L1d cache: 32K L1i cache: 32K L2 cache: 256K L3 cache: 8192K NUMA node0 CPU(s): 0-7 Flags: [...]
update: Under load the behaviour is a bit different. (note first, that I am now at three cores at 50% each and perf will report 27% inside
I put my cpu under stress with
sysbench --test=cpu --num-threads=8 --max-requests=1000000 run and checked
perf again. Htop reported 3 cores at 100% in kernel (the same cores that show at 50% during idle) and 5 at 100% userland. Perf reported that sysbench occupied 85% of my cpu and does not explain the remaining 15%... I am not sure what this means. Is my cpu effectively reduced to 85% performance?