Commit 2d5b6d9d authored by Felix Seibert's avatar Felix Seibert
Browse files

use osd capacities for the 'unrolling' step in lpt mean rebalancing

parent c27f7d4a
......@@ -244,15 +244,14 @@ class DataDistribution(object):
total_folder_size than the average total folder size of this distribution multiplied by rebalance_factor.
2. reassign the removed folders using the LPT strategy.
# TODO maybe osd_information should be taken into consideration during the unrolling?
movements = {}
folders_to_be_reassigned = []
reassignment_limit = self.get_average_total_folder_size() * rebalance_factor
reassignment_factor = self.get_average_osd_load(osd_information, capacity) * rebalance_factor
# for each OSD, remove the smallest folder until its total_folder_size does not exceed the reassignment_limit
# unrolling
for osd in self.OSDs.values():
while osd.total_folder_size > reassignment_limit:
while osd.total_folder_size > reassignment_factor * osd_information[osd.uuid][capacity]:
folder_id, folder_size = osd.get_smallest_folder()
folders_to_be_reassigned.append(folder.Folder(folder_id, folder_size, None))
movements[folder_id] = osd.uuid
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment