top - 06:49:29 up 16 days, 4:04, 1 user, load average: 1.29, 1.41, 1.51
Tasks: 113 total, 2 running, 111 sleeping, 0 stopped, 0 zombie
%Cpu(s): 89.3 us, 10.7 sy, 0.0 ni, 0.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 1015912 total, 98976 free, 157212 used, 759724 buff/cache
KiB Swap: 2097148 total, 1861284 free, 235864 used. 644952 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
835 root 20 0 734828 40864 8564 S 5.0 4.0 355:51.95 fortnoxd
20518 root 20 0 748864 41780 12884 S 4.0 4.1 64:35.14 travelpayd
3147 root 20 0 982540 23532 6712 S 2.3 2.3 295:10.06 node
11230 root 20 0 679384 21044 13552 R 1.7 2.1 0:00.05 nodejs
30422 mongodb 20 0 319176 4184 0 S 0.7 0.4 66:08.82 mongod
7 root 20 0 0 0 0 S 0.3 0.0 16:20.24 rcu_sched
984 root 20 0 0 0 0 S 0.3 0.0 4:42.43 hwrng
29166 root 20 0 42084 3736 3176 R 0.3 0.4 0:00.23 top
1 root 20 0 37968 5548 3584 S 0.0 0.5 0:32.93 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.20 kthreadd
3 root 20 0 0 0 0 S 0.0 0.0 3:19.36 ksoftirqd/0
5 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kworker/0:0H
8 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_bh
9 root rt 0 0 0 0 S 0.0 0.0 0:00.00 migration/0
10 root rt 0 0 0 0 S 0.0 0.0 0:04.40 watchdog/0
11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kdevtmpfs你好,Stackexchange,我最近遇到了一些关于cpu使用率高的问题,我使用的是Vultr的付费服务,他们抱怨我使用了太多的CPU能量lol,这是我的首要列表,在这个服务器上它说im使用105%的CPU功率,虽然我只看到了12%的使用?
这4个进程是唯一消耗能量的进程,还是有其他可能导致高使用率的东西?
835 root 20 0 734828 40864 8564 S 5.0 4.0 355:51.95 fortnoxd
20518 root 20 0 748864 41780 12884 S 4.0 4.1 64:35.14 travelpayd
3147 root 20 0 982540 23532 6712 S 2.3 2.3 295:10.06 node
11230 root 20 0 679384 21044 13552 R 1.7 2.1 0:00.05 nodejs
root@server-nodes:/# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 1
On-line CPU(s) list: 0
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 1
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 60
Model name: Virtual CPU 714389bda930
Stepping: 1
CPU MHz: 2399.996
BogoMIPS: 4799.99
Hypervisor vendor: KVM
Virtualization type: full
L1d cache: 32K
L1i cache: 32K
L2 cache: 4096K
L3 cache: 16384K
NUMA node0 CPU(s): 0发布于 2018-11-10 13:11:04
第一个也是最重要的问题:主机的性能是否符合您的要求。用户响应时间,吞吐量。如果不是,修改它:提高工作负载的效率,或者增加更多的资源(更多的CPU,扩展到更多的框)。
您有一个1 CPU盒,有时报告1.5个平均负载。平均而言,多个等待运行的任务将充分利用一个CPU盒。(充分利用是否意味着停滞不前是另一个问题。)
从手册页面中注意到,顶部测量的是什么:
%CPU --自上次屏幕更新以来,任务在经过的CPU时间中所占的份额,以CPU总时间的百分比表示。
由于顶部的上一次更新间隔可能不会捕捉到100%的突发事件。查看在进程生存期内消耗的CPU总量的TIME列。
也可以试试其他Linux性能工具,有很多.。例如,perf top将准确地显示用户或内核代码顶部作业的位置。
https://serverfault.com/questions/939273
复制相似问题