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
fdba2409
Commit
fdba2409
authored
Jul 20, 2018
by
Felix Seibert
Browse files
fix two errors in lpt rebalancing
parent
9df9f975
Changes
1
Hide whitespace changes
Inline
Side-by-side
xtreemfs_client/dataDistribution.py
View file @
fdba2409
...
...
@@ -268,6 +268,7 @@ class DataDistribution(object):
processing time than the average processing time of this distribution multiplied by rebalance_factor.
2. reassign the removed folders using the LPT strategy.
"""
total_folder_size
=
self
.
get_total_folder_size
()
movements
=
{}
folders_to_be_reassigned
=
[]
...
...
@@ -276,7 +277,7 @@ class DataDistribution(object):
for
osd
in
self
.
OSDs
.
values
():
# self.get_total_folder_size / self.get_total_bandwidth() is the optimal processing time for each OSD:
# this value is a lower bound for the makespan
reassignment_limit
=
osd
.
bandwidth
*
(
self
.
get_total_folder_size
()
/
self
.
get_total_bandwidth
()
)
reassignment_limit
=
self
.
get_rebalance_limit
(
rebalance_factor
,
total_folder_size
)
while
osd
.
get_processing_time
()
>
reassignment_limit
:
folder_id
,
folder_size
=
osd
.
get_smallest_folder
()
folders_to_be_reassigned
.
append
(
folder
.
Folder
(
folder_id
,
folder_size
,
None
))
...
...
@@ -291,6 +292,9 @@ class DataDistribution(object):
return
movements
def
get_rebalance_limit
(
self
,
factor
,
total_folder_size
):
return
factor
*
(
total_folder_size
/
self
.
get_total_bandwidth
())
def
rebalance_one_folder
(
self
):
"""
rebalance folders to OSDs by assigning folders to new OSDs using the following strategy:
...
...
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