Sword refers to the tuning of the architect series-linux

Source: Internet
Author: User

1. I/O tuning

The iostat command output under CentOS is as follows:

$iostat-D-K 1 2  # view TPS and throughput

The parameter-D indicates that the device (disk) usage status is displayed; k Some columns that use block are forced to use kilobytes; 1 10 indicates that the data is refreshed every 1 seconds and is displayed 2 times.

TPS: The number of times the device is transferred per second, which is an I/O request. Multiple logical requests may be merged into "one I/O request". The size of the "one transfer" request is unknown.

KB_READ/S: The amount of data read from the device per second, KB_WRTN/S: The amount of data written to the device per second, Kb_read: Total data Read, KB_WRTN: The total amount of data written, and the units are kilobytes.

Common usage is as follows:

iostat-d-x-k 1 2   # View Device usage (%util), Response time (r_await/w_await)

If%util is close to 100%, it indicates that there are too many I/O requests, the I/O system is full, and the disk may have bottlenecks.

Avgqu-sz is also an IO tuning need to pay attention to, this is the direct operation of the size of the data, if the number of times, but the small amount of data, in fact, the IO will be very small. If the data is large, the IO data will be high

Iostat-c 1 2         # View CPU Status

 

Idle less than 70% io pressure is larger, the general reading speed has more wait.

Vmstat 2 1  # 2 seconds sampled, 1 times

  

b indicates the number of processes waiting for the resource; WA indicates the percentage of CPU time that IO waits for, higher than 30% when IO pressure is high

Reference article:

Http://www.ha97.com/4546.html

Sword refers to the tuning of the architect series-linux

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.