First, explain the reason for the D status.
Illustrates how a process runs, first, at run time, when the process requests some services from the kernel, the kernel suspends the program and puts the process into the parked queue, which usually stays in the parked queue for a short time and does not appear in the PS (1) list. But if the kernel is unable to provide services for some reason. For example, the process is going to read a particular disk block, but the disk controller is broken, and unless the process finishes reading the disk, the kernel cannot move the process out of the parked queue, at which point the process flag bit is set to D. The process on the parked queue will not be able to receive a signal because the process can only accept signals when it is running. The solution to this problem is either to give the resource to the process, or to reboot.
In layman's words, the cause of the D-State is that the process of uninterruptible sleep state is generally due to waiting for IO, such as disk IO, network IO, etc. After the IO request is not given, the process generally goes to the uninterruptible sleep state, for example, if the NFS server is closed without amount the relevant directory beforehand. If the client executes DF, it will hang the entire session, and then use PS AXF to see if the DF process status bit has changed to D.
In the case of a high load, it is possible to see if the uninterruptible sleep process is caused by vmstat, where column B of the procs portion of the Vmstat command represents the number of uninterruptible sleep:
procs for Time ). inch sleep.
For example, the server exists uninterruptible sleep process, through the PS aux view, is the database writes the process, the preliminary judgment process waits for IO.
Note:
Because only the running process can accept the signal, the process that is in uninterruptible sleep cannot be killed with the kill command, even if the signal is 9 or 15 plus.
Reference:
http://www.dewen.net.cn/q/5664
Uninterruptible Sleep (D) status for Linux processes