Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Felix Seibert
xtreemfs_client
Commits
2d5b6d9d
Commit
2d5b6d9d
authored
Apr 27, 2018
by
Felix Seibert
Browse files
use osd capacities for the 'unrolling' step in lpt mean rebalancing
parent
c27f7d4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
xtreemfs_client/dataDistribution.py
View file @
2d5b6d9d
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment