add new io-scheduler to use cgroup on high-speed device
RFC 1/1 add new io-scheduler to use cgroup on high-speed device
From: Robin Dong <[email protected]>
We want to use blkio.cgroup on high-speed device (like fusionio) for our mysql clusters. After testing different io-scheduler, we found that cfq is too slow and deadline can't run on cgroup. So we developed a new io-scheduler: tpps (Tiny Parallel Proportion Scheduler).It dispatch requests only by using their individual weight and total weight (proportion) therefore it's simply and efficient.
Test case: fusionio card, 4 cgroups, iodepth-512
groupname weight test1 1000 test2 800 test3 600 test4 400
Use tpps, the result is:
groupname iops avg-rt(ms) max-rt(ms) test1 30220 16 54 test2 28261 18 56 test3 26333 19 69 test4 20152 25 87
Use cfq, the result is:
groupname iops avg-rt(ms) max-rt(ms) test1 16478 30 242 test2 13015 39 347 test3 9300 54 371 test4 5806 87 393
Signed-off-by Robin Dong <[email protected]>
Signed-off-by Zhu Yanhai <[email protected]>
Cc Tejun Heo <[email protected]>
Cc Vivek Goyal <[email protected]>
Cc Jens Axboe <[email protected]>
Cc Tao Ma <[email protected]>
--- block/Kconfig.iosched | 13 + block/Makefile | 1 + block/tpps-iosched.c | 1272 ++++++++++++++++++++++++++++++++++++++++++++++++ include/linux/blkdev.h | 2 +- 4 files changed, 1287 insertions(+), 1 deletions(-) create mode 100644 block/tpps-iosched.c
block/Kconfig.iosched +13 -0
@@ -21,6 +21,16 @@ config IOSCHED_DEADLINE a new point in the service tree and doing a batch of IO from there in case of expiry. +config IOSCHED_TPPS + tristate "TPPS I/O scheduler" + # If BLK_CGROUP is a module, TPPS has to be built as module. + default y + ---help--- + The TPPS I/O scheduler tries to distribute iops proportional + among all cgroups in the system. It should also provide a low + latency working environment, suitable for flash-based device. + Note: If BLK_CGROUP=m, then TPPS can be built only as module. + config IOSCHED_CFQ tristate "CFQ I/O scheduler" default y
@@ -49,6 +59,9 @@ choice config DEFAULT_DEADLINE bool "Deadline" if IOSCHED_DEADLINE=y + config DEFAULT_TPPS + bool "Tiny Parallel Proportion" if IOSCHED_TPPS=y + config DEFAULT_CFQ bool "CFQ" if IOSCHED_CFQ=y
block/Makefile +1 -0
@@ -15,6 +15,7 @@ obj-$(CONFIG_BLK_DEV_THROTTLING) += blk-throttle.o obj-$(CONFIG_IOSCHED_NOOP) += noop-iosched.o obj-$(CONFIG_IOSCHED_DEADLINE) += deadline-iosched.o obj-$(CONFIG_IOSCHED_CFQ) += cfq-iosched.o +obj-$(CONFIG_IOSCHED_TPPS) += tpps-iosched.o obj-$(CONFIG_BLOCK_COMPAT) += compat_ioctl.o obj-$(CONFIG_BLK_DEV_INTEGRITY) += blk-integrity.o
block/tpps-iosched.c new file +1272 -0
1,272 lines not on this page · raw message
include/linux/blkdev.h +1 -1
@@ -42,7 +42,7 @@ struct blkcg_gq;* Maximum number of blkcg policies allowed to be registered concurrently. * Defined here to simplify include dependency. */ -#define BLKCG_MAX_POLS 2 +#define BLKCG_MAX_POLS 3struct request ;typedef void (rq_end_io_fn )(struct request *,int );
Signature · 1 line
1.7.1