Disk I/O optimization

Source: Internet
Author: User

Disk I/O optimization

1. Performance Testing

Our applications often require access to the disk system, and disk I/O is often time-consuming to determine if I/O is a bottleneck, and some parameter indicators can be referenced.

We can stress test the application to see if the system's i/owait indicators are normal. For example, if the test server has 4 CPUs, the ideal I/O wait parameter should be no more than 25%, and if it exceeds 25% then I/O is likely to be a performance bottleneck for the application. Linux operating system can be viewed through the iostat command.

[[Email protected] ~]# iostat Linux2.6. +-431.23.3. el6.x86_64 (IZ239YQA63MZ) -/ -/ -_x86_64_ (1CPU) Avg-CPU:%user% Nice%system%iowait%steal%Idle0.37    0.00    0.27    5.28    0.00   94.08Device:tps Blk_read/s blk_wrtn/s Blk_read Blk_wrtnxvda5.08       208.63         2.38  335106884    3815224Xvdb1.95        30.33         0.35   48718248     559072

Usually we look at another parameter when judging I/O performance. Is the IOPS, which is also related to the size and access of the data blocks stored on disk, but is primarily determined by the speed of the disk. The higher the disk speed, the higher the disk IOPS.

2. Improve I/O performance

The usual ways to improve disk I/O performance are:

1. Increase the cache and reduce the number of disk accesses.

2. Optimize the Disk Management system, design the optimal disk mode policy, has the disk's addressing strategy, which is considered at the level of the underlying operating system.

3. Design reasonable data storage blocks, and access to these data blocks of the strategy, these are at the application level, such as: we can give the data stored in the design index, through the addressing index to speed up and reduce the amount of disk access, but also in an asynchronous and non-blocking way to speed up disk access.

4. Apply a reasonable Raid

Disk I/O optimization

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.