Docker CPU????????CPU??????????
???????????? ???????[ 2016/2/22 14:07:45 ] ????????CPU ???????
?????????????——Docker CPU ??????? ?н????????COU?????????????????????????CPU??????????COU????
???????????
????1??????CPU????image??agileek/cpuset-test????????????????CPU??image?????????CPU???????.
????$ docker pull agileek/cpuset-test
????2?????δ???κ???????CPU??????
[root@elk ~]# mpstat -P ALL 5 10
Linux 3.10.0-123.el7.x86_64 (elk) 02/16/2016 _x86_64_ (8 CPU)
08:10:57 AM CPU %usr %nice %sys %iowait %irq %soft %steal %guest %gnice %idle
08:11:02 AM all 0.05 0.00 0.13 0.00 0.00 0.00 0.00 0.00 0.00 99.82
08:11:02 AM 0 0.20 0.00 0.20 0.00 0.00 0.00 0.00 0.00 0.00 99.60
08:11:02 AM 1 0.00 0.00 0.20 0.00 0.00 0.00 0.00 0.00 0.00 99.80
08:11:02 AM 2 0.20 0.00 0.20 0.00 0.00 0.00 0.00 0.00 0.00 99.60
08:11:02 AM 3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
08:11:02 AM 4 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
08:11:02 AM 5 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00
08:11:02 AM 6 0.00 0.00 0.20 0.00 0.00 0.00 0.00 0.00 0.00 99.80
08:11:02 AM 7 0.20 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 99.80
[root@elk ~]# top
top - 08:22:48 up 27 days?? 20:31?? 4 users?? load average: 2.18?? 7.36?? 4.61
Tasks: 216 total?? 1 running?? 215 sleeping?? 0 stopped?? 0 zombie
%Cpu(s): 0.0 us?? 0.1 sy?? 0.0 ni?? 99.8 id?? 0.0 wa?? 0.0 hi?? 0.0 si?? 0.0 st
KiB Mem: 16151132 total?? 3742548 used?? 12408584 free?? 6392 buffers
KiB Swap: 8200188 total?? 0 used?? 8200188 free. 1847800 cached Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
11373 logstash 39 19 8087940 457188 15804 S 0.7 2.8 145:09.16 java
482 root 20 0 0 0 0 S 0.3 0.0 29:06.19 xfsaild/dm-1
31713 elastic+ 20 0 5797384 269444 14436 S 0.3 1.7 155:43.65 java
1 root 20 0 50684 4488 2336 S 0.0 0.0 0:32.37 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.45 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:04.83 ksoftirqd/0
5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H
7 root rt 0 0 0 0 S 0.0 0.0 0:00.50 migration/0
8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh
9 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/0
10 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/1
11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/2
12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/3
13 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/4
14 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/5
15 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/6
16 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/7
17 root 20 0 0 0 0 S 0.0 0.0 16:09.47 rcu_sched
18 root 20 0 0 0 0 S 0.0 0.0 1:01.54 rcuos/0
19 root 20 0 0 0 0 S 0.0 0.0 0:53.77 rcuos/1
20 root 20 0 0 0 0 S 0.0 0.0 1:00.50 rcuos/2
21 root 20 0 0 0 0 S 0.0 0.0 0:53.75 rcuos/3
22 root 20 0 0 0 0 S 0.0 0.0 0:55.59 rcuos/4
23 root 20 0 0 0 0 S 0.0 0.0 0:44.15 rcuos/5
24 root 20 0 0 0 0 S 0.0 0.0 0:53.57 rcuos/6
????3????????????????CPU?????1000???????CPU??????
????[root@elk ~]# docker run -it --rm -c 1000 agileek/cpuset-test
????Burning 8 CPUs/cores
????????????CPU??????
[root@elk ~]# top
top - 08:14:33 up 27 days?? 20:22?? 4 users?? load average: 7.26?? 3.04?? 1.18
Tasks: 220 total?? 1 running?? 219 sleeping?? 0 stopped?? 0 zombie
%Cpu(s):100.0 us?? 0.0 sy?? 0.0 ni?? 0.0 id?? 0.0 wa?? 0.0 hi?? 0.0 si?? 0.0 st
KiB Mem: 16151132 total?? 3745232 used?? 12405900 free?? 6508 buffers
KiB Swap: 8200188 total?? 0 used?? 8200188 free. 1849724 cached Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
17258 root 20 0 36732 936 564 S 800.0 0.0 19:13.78 cpuburn
17218 root 20 0 0 0 0 S 0.3 0.0 0:00.02 kworker/0:2
17348 root 20 0 123680 1724 1148 R 0.3 0.0 0:00.01 top
1 root 20 0 50684 4488 2336 S 0.0 0.0 0:32.35 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.45 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 0:04.83 ksoftirqd/0
5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H
7 root rt 0 0 0 0 S 0.0 0.0 0:00.50 migration/0
8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh
9 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/0
10 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/1
11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/2
12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/3
13 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/4
14 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/5
15 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcuob/6
????????????????PID17258???????????????????docker??????CPU????????8??CPU??????800%??
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11