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
keep more metaslabs loaded #9197
Conversation
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
|
What would you think about taking this even further and including DLPX-65016? I think that would make sense assuming this lands after #9181. |
Codecov Report
@@ Coverage Diff @@
## master #9197 +/- ##
=========================================
- Coverage 79.22% 77.82% -1.4%
=========================================
Files 400 389 -11
Lines 122001 121530 -471
=========================================
- Hits 96656 94585 -2071
- Misses 25345 26945 +1600
Continue to review full report at Codecov.
|
|
@ahrens I'll fold in both of those changes as well. |
…etaslabs loaded Reviewed at: http://reviews.delphix.com/r/50808/
…val is cancelled with loaded metaslabs, assertion fails Reviewed at: http://reviews.delphix.com/r/50310/
Signed-off-by: Paul Dagnelie <pcd@delphix.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll merge this after #9181 ?
| @@ -15,7 +15,7 @@ | |||
| # | |||
|
|
|||
| # | |||
| # Copyright (c) 2018 by Delphix. All rights reserved. | |||
| # Copyright (c) 2018, 2019 by Delphix. All rights reserved. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] looks like you can revert this
I talked with Paul about this and he felt it would be fine to merge them in either order. So I suggest we go ahead with this one once the last nits have been resolved. |
With the other metaslab changes loaded onto a system, we can significantly reduce the memory usage of each loaded metaslab and unload them on demand if there is memory pressure. However, none of those changes actually result in us keeping more metaslabs loaded. If we don't keep more metaslabs loaded, we will still have to wait for demand-loading to finish when no loaded metaslab can satisfy our allocation, which can cause ZIL performance issues. In addition, performance is traditionally measured by IOs per unit time, while unloading is currently done on a txg-count basis. Txgs can take a widely varying range of times, from tenths of a second to several seconds. This can result in confusing, hard to predict behavior. This change simply adds a time-based component to metaslab unloading. A metaslab will remain loaded for one minute and 8 txgs (by default) after it was last used, unless it is evicted due to memory pressure. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Matt Ahrens <mahrens@delphix.com> Signed-off-by: Paul Dagnelie <pcd@delphix.com> External-issue: DLPX-65016 External-issue: DLPX-65047 Closes openzfs#9197
Motivation and Context
With the other metaslab changes loaded onto a system, we can significantly reduce the memory usage of each loaded metaslab and unload them on demand if there is memory pressure. However, none of those changes actually result in us keeping more metaslabs loaded. If we don't keep more metaslabs loaded, we will still have to wait for demand-loading to finish when no loaded metaslab can satisfy our allocation, which can cause ZIL performance issues. In addition, performance is traditionally measured by IOs per unit time, while unloading is currently done on a txg-count basis. Txgs can take a widely varying range of times, from tenths of a second to several seconds. This can result in confusing, hard to predict behavior.
Description
This change simply adds a time-based component to metaslab unloading. A metaslab will remain loaded for one minute and 8 txgs (by default) after it was last used, unless it is evicted due to memory pressure.
How Has This Been Tested?
zfs-test and zloop, and performance testing to verify no regressions.
Types of changes
Checklist:
Signed-off-by.