Search for high I/O latency issues on Linux servers

Source: Internet
Author: User

Search for high I/O latency issues on Linux servers

0. First, check the system status on top.

Two parameters are found to be abnormal. One is high average load, and the other is that cpu % wa is always above 50%.

Check the meaning of the % wa parameter:

 
 
  1. wa -- iowait  
  2.  Amount of time the CPU has been waiting for I/O to complete. 

1. view disk read/write data

View disk status with iostat

 
 
  1. $ iostat -x 2 5  
  2.  avg-cpu: %user %nice %system %iowait %steal %idle  
  3.   3.66 0.00 47.64 48.69 0.00 0.00  
  4.  
  5.  Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await r_await w_await svctm %util  
  6.  sda 44.50 39.27 117.28 29.32 11220.94 13126.70 332.17 65.77 462.79 9.80 2274.71 7.60 111.41  
  7.  dm-0 0.00 0.00 83.25 9.95 10515.18 4295.29 317.84 57.01 648.54 16.73 5935.79 11.48 107.02  
  8.  dm-1 0.00 0.00 57.07 40.84 228.27 163.35 8.00 93.84 979.61 13.94 2329.08 10.93 107.02 

2. view the process status

Process status table

 
 
  1. PROCESS STATE CODES  
  2.  D uninterruptible sleep (usually IO)  
  3.  R running or runnable (on run queue)  
  4.  S interruptible sleep (waiting for an event to complete)  
  5.  T stopped, either by a job control signal or because it is being traced.  
  6.  W paging (not valid since the 2.6.xx kernel)  
  7.  X dead (should never be seen)  
  8.  Z defunct ("zombie") process, terminated but not reaped by its parent. 

View the Ddisk sleep process in the process.

 
 
  1. # for x in `seq 1 1 10`; do ps -eo state,pid,cmd | grep "^D"; echo "----"; sleep 5; done 

Check that the kjournald process exists.

Check what this process does?

Kjournald is an ext3 file system logging process.

View Process status information

 
 
  1. # cat /proc/487/io  
  2.  rchar: 48752567  
  3.  wchar: 549961789  
  4.  syscr: 5967  
  5.  syscw: 67138  
  6.  read_bytes: 49020928  
  7.  write_bytes: 549961728  
  8.  cancelled_write_bytes: 0 

Check where everything is written.

 
 
  1. # lsof -p 487 

The cause of kjournald status D is still being checked ....

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.