Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find out which process is consuming "wait CPU" (i.e. I/O blocked)

With top it's easy to find out how much CPU each job uses. However, I want to hunt down a job that causes a high wait CPU. Is there a way to find out which jobs are blocked on I/O?

like image 918
Michael Kuhn Avatar asked Mar 20 '09 16:03

Michael Kuhn


People also ask

How can I tell which process is consuming my CPU?

Run the iostat command without any option will display the information about CPU utilization, device utilization, and network file system utilization. Use the -c option to break the CPU utilization into user processes, system processes, I/O wait, and idle time.

How can you find the top 10 CPU consuming processes?

Use ps Command to Find Top Processes by Memory and CPU Usage You can use the ps command with –sort argument to sort the output by memory and CPU usage.

Why CPU wait time is high?

A high waiting time indicates that the CPU is *stranded* because of the I/O operations on that device. For optimal performance, one should aim to keep the I/O waiting CPU time as low as possible. If waiting time is > 10%, then it is worth investigating it.

How do you sort a process by CPU usage in the top?

To sort all running processes by CPU utilization, simply press Shift+P key.


1 Answers

The processes blocked on IO are the ones marked as D in the status column (S column in top).

like image 118
Johannes Weiss Avatar answered Sep 28 '22 10:09

Johannes Weiss