I have a theoretical question about CPU usage. When the CPU usage goes to 100%, what does it mean ? Does this mean, I have too large data ? Or does this mean I have too large files ? Or too large number of files ? or too much data on JVM ?
This is Java I/O operation done using Multi threaded application.
It means that your application makes more computations than what your CPU
can manage such that your CPU
is totally overloaded, proportionally it doesn't do much IO
compared to computations because IO
adds some latency that will consequently reduce the CPU
usage, for example an infinite loop with no pause will consume 100 %
of the affected CPU
.
while(true);
While an infinite loop with a pause will consume much less CPU
as we will have less computations to be done per unit of time.
while(true) {
Thread.sleep(50L);
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.