diff options
author | Paul Dagnelie <[email protected]> | 2019-08-29 10:20:36 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-08-29 10:20:36 -0700 |
commit | eef0f4d84ec8e33b25792485f1f915efeb95af77 (patch) | |
tree | 3c0e4119bd252c7128efc5247694d6bcd61d8e8f /include/sys/metaslab_impl.h | |
parent | e6cebbf86e769eba7c0e7b8834985682d1b38e7e (diff) |
Keep more metaslabs loaded
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 <[email protected]>
Reviewed-by: Matt Ahrens <[email protected]>
Signed-off-by: Paul Dagnelie <[email protected]>
External-issue: DLPX-65016
External-issue: DLPX-65047
Closes #9197
Diffstat (limited to 'include/sys/metaslab_impl.h')
-rw-r--r-- | include/sys/metaslab_impl.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sys/metaslab_impl.h b/include/sys/metaslab_impl.h index 07f07c02d..3ce39183e 100644 --- a/include/sys/metaslab_impl.h +++ b/include/sys/metaslab_impl.h @@ -489,6 +489,7 @@ struct metaslab { */ hrtime_t ms_load_time; /* time last loaded */ hrtime_t ms_unload_time; /* time last unloaded */ + hrtime_t ms_selected_time; /* time last allocated from */ uint64_t ms_alloc_txg; /* last successful alloc (debug only) */ uint64_t ms_max_size; /* maximum allocatable size */ |