Hi,
Creating a synflood via: 'hping3 -V -S -M 0 -p 80 --flood -y <ip addr>', when
I have:
CONFIG_NO_HZ_IDLE=y or
CONFIG_NO_HZ_FULL=y set, and
either:
CONFIG_VIRT_CPU_ACCOUNTING_GEN=y or
CONFIG_TICK_CPU_ACCOUNTING=y
shows almost 0% cpu usage via top (or /proc/stat), whereas if I have turbostat
running there is substantial cpu usage....
I'm just wondering if anybody else has seen/can reproduce this, as
it seems quite strange.
The under-reporting here also seems specific to this workload- Other network
loads that I generate seem to properly account cpu time.
If I switch to CONFIG_HZ_PERIODIC=y or set
CONFIG_IRQ_TIME_ACCOUNTING=y, I again see substantial softirq usage
as would be expected here.
I'm attaching one complete .config that exhibits the issue.
Thanks,
-Jason
Hello,
I can confirm that I'm also observing the same issue. Here is the output
of turbostat:
without hping running (Most of the time is spent in idle C6 state, which
is expected):
pk cor CPU %c0 GHz TSC SMI %c1 %c3 %c6 %c7 CTMP PTMP
%pc2 %pc3 %pc6 %pc7 Pkg_W Cor_W RAM_W PKG_% RAM_%
0.02 1.77 2.10 0 0.09 0.00 99.89 0.00
54 53 6.45 0.00 93.05 0.00 15.93 1.25 5.90 0.00 0.00
0 0 0 0.02 1.81 2.10 0 0.05 0.00 99.92 0.00 47
47 6.53 0.00 93.00 0.00 7.86 0.57 4.22 0.00 0.00
0 0 12 0.01 1.48 2.10 0 0.07
0 1 1 0.05 1.46 2.10 0 0.18 0.00 99.77 0.00 47
0 1 13 0.01 1.56 2.10 0 0.22
0 2 2 0.01 1.61 2.10 0 0.06 0.00 99.93 0.00 47
0 2 14 0.02 1.81 2.10 0 0.05
0 3 3 0.03 1.92 2.10 0 0.04 0.00 99.93 0.00 47
0 3 15 0.01 1.60 2.10 0 0.07
0 4 4 0.01 1.60 2.10 0 0.06 0.00 99.93 0.00 47
0 4 16 0.01 1.61 2.10 0 0.06
0 5 5 0.01 1.57 2.10 0 0.03 0.00 99.96 0.00 47
0 5 17 0.00 1.62 2.10 0 0.03
1 0 6 0.01 1.66 2.10 0 0.03 0.00 99.96 0.00 51
53 6.37 0.00 93.10 0.00 8.07 0.67 1.68 0.00 0.00
1 0 18 0.01 1.57 2.10 0 0.04
1 1 7 0.03 1.44 2.10 0 0.10 0.00 99.87 0.00 51
1 1 19 0.00 1.62 2.10 0 0.13
1 2 8 0.01 1.64 2.10 0 0.06 0.00 99.94 0.00 51
1 2 20 0.01 1.41 2.10 0 0.05
1 3 9 0.03 1.57 2.10 0 0.11 0.00 99.86 0.00 51
1 3 21 0.01 1.49 2.10 0 0.13
1 4 10 0.20 2.04 2.10 0 0.08 0.00 99.72 0.00 51
1 4 22 0.01 1.49 2.10 0 0.27
1 5 11 0.01 1.66 2.10 0 0.11 0.00 99.88 0.00 54
1 5 23 0.02 1.71 2.10 0 0.10
And with hping running as per your email:
pk cor CPU %c0 GHz TSC SMI %c1 %c3 %c6 %c7 CTMP PTMP
%pc2 %pc3 %pc6 %pc7 Pkg_W Cor_W RAM_W PKG_% RAM_%
10.91 2.10 2.10 0 36.57 0.75 51.77 0.00
59 59 49.50 0.13 0.86 0.00 46.39 22.55 5.49 0.00 0.00
0 0 0 0.10 2.07 2.10 0 94.47 1.68 3.76 0.00 56
59 0.66 0.27 0.71 0.00 28.70 16.90 3.85 0.00 0.00
0 0 12 31.26 2.10 2.10 0 63.31
0 1 1 33.87 2.10 2.10 0 61.20 1.58 3.35 0.00 55
0 1 13 33.87 2.10 2.10 0 61.20
0 2 2 33.77 2.10 2.10 0 61.59 1.42 3.22 0.00 56
0 2 14 33.95 2.10 2.10 0 61.42
0 3 3 31.66 2.10 2.10 0 63.25 1.37 3.72 0.00 52
0 3 15 0.03 2.01 2.10 0 94.88
0 4 4 31.59 2.10 2.10 0 62.80 1.47 4.14 0.00 59
0 4 16 0.03 2.01 2.10 0 94.36
0 5 5 31.21 2.10 2.10 0 63.43 1.50 3.86 0.00 57
0 5 17 0.03 2.00 2.10 0 94.61
1 0 6 0.04 1.72 2.10 0 0.08 0.00 99.88 0.00 55
58 98.33 0.00 1.00 0.00 17.70 5.65 1.64 0.00 0.00
1 0 18 0.01 1.47 2.10 0 0.11
1 1 7 0.02 1.53 2.10 0 0.05 0.00 99.94 0.00 52
1 1 19 0.01 1.43 2.10 0 0.06
1 2 8 0.01 1.49 2.10 0 0.04 0.00 99.95 0.00 58
1 2 20 0.01 1.31 2.10 0 0.04
1 3 9 0.04 1.59 2.10 0 0.09 0.00 99.88 0.00 51
1 3 21 0.01 1.41 2.10 0 0.11
1 4 10 0.22 2.04 2.10 0 0.09 0.00 99.69 0.00 53
1 4 22 0.01 1.54 2.10 0 0.30
1 5 11 0.06 1.91 2.10 0 0.10 0.00 99.84 0.00 52
1 5 23 0.02 1.49 2.10 0 0.15
Which clearly shows that the processor spent some time to process the
syn flood packets, however
"top" reported the cpu usage at 0%. My kernel version is v4.0
Hello
I can confirm that I'm also observing the same issue when running
turbostat. I've attached the respective turbostat log with and without
the hping syn flood running. I've also attached my kernel config.
It's evident that when the CPU is in c0 state (processing data) due to
the syn packets the top utility doesn't detect it (for me it was showing
sustained 0% usage both for kernel and user space)
Regards,
Nikolay