-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix dmu throttle on zvols #6207
Conversation
Signed-off-by: Richard Yao <[email protected]>
@ryao, thanks for your PR! By analyzing the history of the files in this pull request, we identified @bprotopopov, @behlendorf and @edillmann to be potential reviewers. |
@ryao , I'm trying to apply this patch to 0.6.5.8, before this, i had applied the 6133, zvol_get_data in 6133 has five parameters, the struct zil_writer *zilw was added, should i keep it as 6133(add the zil_writer) or 6207(remove the zil writer)? thank you very much. |
@wangdbang You should add it, although you might want to hold off until I fix the test failures that the buildbot found. |
@ryao , Ok, get it. thanks again. |
This refactors the zvol threads to open the transaction group commit inside the dispatch thread. This enables the dmu_tx throttle to scale back IO when we are writing too often. The theory being that we can minimize potential walls of wait that come from filling up the txg commit. Signed-off-by: Richard Yao <[email protected]>
Doh! now this conflicts with 6058 :). |
@ryao ,I applied the zvol.c to replace the 0.6.5.8 and resolved some compile issue, but it could not create the /dev/zd0 device, zfs create -b 4k -V 200GB POOL00/VOL00 command returned success, which branch your changes base on, master(0.7.0rc4)? the zd0 would be created when i reboot the machine and import the POOL00. |
@sempervictus I don't think @behlendorf would like that idea. I am delaying refreshing this by a few days to tackle a bigger performance issue that provides greater gains for work. @wangdbang This turned out to cause problems at work. I suggest holding off on this until I have resolved the issues. |
Yes, let's keep these proposed changes separate. I have cherry picked the trivial bug fix 4a573fd in to master, thanks for keeping that as an independent commit. |
@behlendorf I try to keep logical changes separate, even if I put them into the same pull request. I learned keeping them separate from you. :) |
@ryao , ok, get it. |
Signed-off-by: Richard Yao <[email protected]>
@ryao, I have verified your change, the /dev/zd0 created successfully, i will run some io test on it. thanks. |
Signed-off-by: Richard Yao <[email protected]>
The "second try" also worked. here is the io test output. |
@wangdbang What were your numbers before this patch? Were they 3k+ like you reported here? |
Signed-off-by: Richard Yao <[email protected]>
@ryao , the ENV changed, I will run io test and paste the test data on 2017/6/19. |
Hello yao, use the release 0.6.5.8 without any patch to run the io test with the same test tool and fio command, the output iops was 18220(rand read) and 7806(reand write) mixed. |
Here are the orion with 4kb rand write io test data, 7X intel 3510 SSD created a raidz1 and 500GB zvol. 4kb rand rewrite iops zfs 0.6.5.8 + 6133 patch + 6207 patch 4kb rand rewrite iops |
Why orion and fio test result has so big difference? |
I have a concern with this approach. Since writes get throttled synchronously, reads don't. Wouldn't it cause unfairness between read and write? |
Closing as out of date, the idea here is worth further analysis if someone is interested in working on it. |
Description
The idea here is to open the transaction before passing to a worker thread. That allows the DMU throttle to work its magic. This was inspired by my original idea to try to have this operate asynchronously via the DMU. That turned out to cause potential IO amplification, so I scrapped it in favor of this simpler approach. I had reverted @tuxoko's work, but by the time I had finished, I had something that looked very similar to what he had done.
I also found a small bug in the zvol_init() handling. The patch to fix it is broken out into a discrete patch, but included in the PR.
Motivation and Context
This is intended to improve zvol IOPS performance. Actual mileage will vary. This is meant to address #6127.
How Has This Been Tested?
This actually slowed average IOPS down at work when placed on top of the ZIL commit changes. It was not tested independently and the testing was done on a backport to the 0.6.5.x branch. The theory is sound, so I am putting it out there for comments and review. Maybe it will help other people's workloads.
Types of changes
Checklist:
Signed-off-by
.