A problem that may affect IO performance

Source: Internet
Author: User

Recently wrote a driver to virtual a file into SCSI DISK. The driver is essentially an HBA driver. When driving performance testing, it is found that IO performance is very low, only achieves 4mb/s throughput when a large amount of data is written, and has high performance when writing a small amount of data. The drive IO model is shown in the following illustration:

A print analysis of the Queuecommand process in the driver found that the SCSI middle layer sent the request slowly. This indicates that the SCSI command queue is full, so SML cannot dispatch command. Through analysis, the question is focused on: Why is the virtual HBA driver writing files so slow? Is there a problem with the performance of accessing files in the kernel?

Careful analysis of Io path, combined with the test found that the driver's performance problem is memory resources. When testing with the DD tool, data accessing the scsi_device is flushed to the disk with data from the push to buffer Cache,buffer cache and arrives in the page cache via virtual HBA driver. This IO relationship will cause SCSI device and file to compete with memory resources, and if the application has a lot of write data, then file will be very difficult to get page cache, so IO performance will be very low.

To verify this idea, the Linux loop device was tested and found that the loop device also had a performance drop problem when a large amount of data was written.

This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/database/storage/

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.