dm thin: throttle incoming IO
authorJoe Thornber <ejt@redhat.com>
Mon, 6 Oct 2014 14:45:59 +0000 (15:45 +0100)
committerMike Snitzer <snitzer@redhat.com>
Mon, 10 Nov 2014 20:25:27 +0000 (15:25 -0500)
commit7d327fe051edcccf54da7b6733c58992473f228b
tree1ca888c5ae5aec4eac0db71590405268a7bbae6b
parent8a01a6af75f839ff8eb25dab69b49224e855bfa1
dm thin: throttle incoming IO

Throttle IO based on the time it's taking the worker to do one loop.
There were reports of hung task timeouts occuring and it was observed
that the excessively long avgqu-sz (as reported by iostat) was
contributing to these hung tasks.

Throttling definitely helps dm-thinp perform better under heavy IO load
(without being detremental by being overzealous).  It reduces avgqu-sz
drastically, e.g.: from 60K to ~6K, and even as low as 150 once metadata
is cached by bufio, when dirty_ratio=5, dirty_background_ratio=2.  And
avgqu-sz stays at or below 30K even with dirty_ratio=20,
dirty_background_ratio=10.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
drivers/md/dm-thin.c