Block Device Performance Tuning

Source: Internet
Author: User

1. Tools

Kprobe, used to catch some real-time data

Iostate-kx 1/dev/*

Blktrace-d/dev/dm-33-o-|blkparse-i-o blkparse.out

Http://blog.chinaunix.net/uid-24774106-id-4096470.html

2. Through trace discovery, sometimes the bio out of the queue is done by the KBLOCKD process, and kblockd every 3ms execution (blk_unplug_timeout), which is the reason for poor performance.

But sometimes, it is in the current context out of the queue, not through the IO scheduling subsystem (should be called __generic_unplug_device).

3. Blk_queue_make_request (), this function inside set q->unplug_delay = Msecs_to_jiffies (3), 3ms wake Kblockd once.

  

Block devices under the device mapped framework:

Dm_request () "Bio's entrance"

--Blk_queue_bio (q, bio)

-Blk_queue_bio

In the Blk_queue_bio function, if bio sets the Bio_rw_unplug bit, the const bool unplug = bio_rw_flagged (bio, bio_rw_unplug);

The __generic_unplug_device () is called, that is, the bio can be forwarded in the current context.

Block Device Performance Tuning

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.