Reputation: 337
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.
Upvotes: 1
Views: 1184
Reputation: 45005
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);
}
Upvotes: 1