A java process running inside UNIX server is usually showing CPU % usage between 10% to 20%.
在UNIX服务器内运行的java进程通常显示CPU%使用率在10%到20%之间。
But, sometimes it jumps to 60% for a second and then immediately come down to 40%, then 20% and so on.
但是,有时它会一秒钟跳到60%,然后立即下降到40%,然后是20%,依此类推。
Is this CPU utilization dangerous? What is the usual threshold of CPU percent usage?
这种CPU利用率是否危险? CPU百分比使用的通常阈值是多少?
Please note, I am running top -c
command with Shift I (to turn off IRIS mode) to monitor the CPU usage.
请注意,我正在使用Shift I(关闭IRIS模式)运行top -c命令来监视CPU使用率。
2 个解决方案
#1
1
Is this CPU utilization dangerous?
这种CPU利用率是否危险?
Not at all. Having a CPU load randomly reaching 60% for one second while moving from 20% to 40% otherwise is a pretty common situation.
一点也不。 CPU负载一秒钟内随机达到60%,而从20%变为40%则是非常常见的情况。
What is the usual threshold of CPU percent usage?
CPU百分比使用的通常阈值是多少?
There is no usual threshold. The CPU is designed to be used. There certainly are use cases where having all cores stuck at 100% for hours is expected, for example CPU bound batches. You are talking about a Unix server and these machines are built to support continuous load. Even if you use a consumer grade machine, or even a laptop, modern CPUs have internal protection against overheating so it should never be "dangerous". After reaching a first threshold the CPU will reduce its clock speed (thermal throttling) and if not sufficient, it will turn itself off. The main risk is for your ears if the server is not in a dedicated room as the fans might became noisy by running full speed to cool down your hardware.
没有通常的门槛。 CPU旨在使用。肯定存在这样的用例,其中所有核心在数小时内保持100%,例如CPU绑定批次。您正在谈论Unix服务器,这些机器是为支持持续负载而构建的。即使您使用的是消费级机器,甚至是笔记本电脑,现代CPU也有内部保护,防止过热,因此它永远不会“危险”。达到第一个阈值后,CPU将降低其时钟速度(热量节流),如果不足,它将自动关闭。如果服务器不在专用房间,主要风险是你的耳朵,因为风扇可能会因全速运行以降低硬件而变得嘈杂。
In any case, with spurious 60% CPU load, you are far from this situation.
在任何情况下,由于虚假的60%CPU负载,您远离这种情况。
#2
2
Dangerous? Not normally. But if your server has a poor heat sink, then it may tend to heat up when all cores are in full use. The tool sensors
displays data from various internal temperature sensors and is a better indicator of overheating.
危险吗?不正常。但是,如果您的服务器具有较差的散热器,那么当所有核心都充分使用时,它可能会变热。工具传感器显示来自各种内部温度传感器的数据,是更好的过热指示。
The CPU usage indication is generally 100%, or on some systems, 100% times the number of cores, so that a 4 core server may show up to 400%.
CPU使用率指示通常是100%,或者在某些系统上,是核心数量的100%,因此4核心服务器可能会显示高达400%。
If a process running on one core has no competition for the CPU from other processes, and does not wait (e.g., for disk, for user input) then it will typically run at 100%.
如果在一个核上运行的进程没有与其他进程竞争CPU,并且没有等待(例如,对于磁盘,用户输入)那么它通常将以100%运行。
Example sensors
output (no danger):
示例传感器输出(无危险):
sensors
acpitz-virtual-0
Adapter: Virtual device
temp1: +27.8°C (crit = +105.0°C)
temp2: +29.8°C (crit = +105.0°C)
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0: +55.0°C (high = +84.0°C, crit = +100.0°C)
Core 0: +53.0°C (high = +84.0°C, crit = +100.0°C)
Core 1: +53.0°C (high = +84.0°C, crit = +100.0°C)
Core 2: +52.0°C (high = +84.0°C, crit = +100.0°C)
Core 3: +55.0°C (high = +84.0°C, crit = +100.0°C)
#1
1
Is this CPU utilization dangerous?
这种CPU利用率是否危险?
Not at all. Having a CPU load randomly reaching 60% for one second while moving from 20% to 40% otherwise is a pretty common situation.
一点也不。 CPU负载一秒钟内随机达到60%,而从20%变为40%则是非常常见的情况。
What is the usual threshold of CPU percent usage?
CPU百分比使用的通常阈值是多少?
There is no usual threshold. The CPU is designed to be used. There certainly are use cases where having all cores stuck at 100% for hours is expected, for example CPU bound batches. You are talking about a Unix server and these machines are built to support continuous load. Even if you use a consumer grade machine, or even a laptop, modern CPUs have internal protection against overheating so it should never be "dangerous". After reaching a first threshold the CPU will reduce its clock speed (thermal throttling) and if not sufficient, it will turn itself off. The main risk is for your ears if the server is not in a dedicated room as the fans might became noisy by running full speed to cool down your hardware.
没有通常的门槛。 CPU旨在使用。肯定存在这样的用例,其中所有核心在数小时内保持100%,例如CPU绑定批次。您正在谈论Unix服务器,这些机器是为支持持续负载而构建的。即使您使用的是消费级机器,甚至是笔记本电脑,现代CPU也有内部保护,防止过热,因此它永远不会“危险”。达到第一个阈值后,CPU将降低其时钟速度(热量节流),如果不足,它将自动关闭。如果服务器不在专用房间,主要风险是你的耳朵,因为风扇可能会因全速运行以降低硬件而变得嘈杂。
In any case, with spurious 60% CPU load, you are far from this situation.
在任何情况下,由于虚假的60%CPU负载,您远离这种情况。
#2
2
Dangerous? Not normally. But if your server has a poor heat sink, then it may tend to heat up when all cores are in full use. The tool sensors
displays data from various internal temperature sensors and is a better indicator of overheating.
危险吗?不正常。但是,如果您的服务器具有较差的散热器,那么当所有核心都充分使用时,它可能会变热。工具传感器显示来自各种内部温度传感器的数据,是更好的过热指示。
The CPU usage indication is generally 100%, or on some systems, 100% times the number of cores, so that a 4 core server may show up to 400%.
CPU使用率指示通常是100%,或者在某些系统上,是核心数量的100%,因此4核心服务器可能会显示高达400%。
If a process running on one core has no competition for the CPU from other processes, and does not wait (e.g., for disk, for user input) then it will typically run at 100%.
如果在一个核上运行的进程没有与其他进程竞争CPU,并且没有等待(例如,对于磁盘,用户输入)那么它通常将以100%运行。
Example sensors
output (no danger):
示例传感器输出(无危险):
sensors
acpitz-virtual-0
Adapter: Virtual device
temp1: +27.8°C (crit = +105.0°C)
temp2: +29.8°C (crit = +105.0°C)
coretemp-isa-0000
Adapter: ISA adapter
Physical id 0: +55.0°C (high = +84.0°C, crit = +100.0°C)
Core 0: +53.0°C (high = +84.0°C, crit = +100.0°C)
Core 1: +53.0°C (high = +84.0°C, crit = +100.0°C)
Core 2: +52.0°C (high = +84.0°C, crit = +100.0°C)
Core 3: +55.0°C (high = +84.0°C, crit = +100.0°C)