-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
planner: implement compaction planner policy
- Loading branch information
1 parent
5b65b3e
commit 6b3063d
Showing
17 changed files
with
1,136 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FAABRIC_VERSION=0.17.0 | ||
FAABRIC_CLI_IMAGE=faasm.azurecr.io/faabric:0.17.0 | ||
FAABRIC_VERSION=0.18.0 | ||
FAABRIC_CLI_IMAGE=faasm.azurecr.io/faabric:0.18.0 | ||
COMPOSE_PROJECT_NAME=faabric-dev | ||
CONAN_CACHE_MOUNT_SOURCE=./conan-cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.17.0 | ||
0.18.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#pragma once | ||
|
||
#include <faabric/batch-scheduler/BatchScheduler.h> | ||
#include <faabric/batch-scheduler/SchedulingDecision.h> | ||
#include <faabric/util/batch.h> | ||
|
||
namespace faabric::batch_scheduler { | ||
|
||
// This batch scheduler behaves in the same way than BinPack for NEW and | ||
// SCALE_CHANGE requests, but for DIST_CHANGE requests it tries to compact | ||
// to the fewest number of VMs. | ||
class CompactScheduler final : public BatchScheduler | ||
{ | ||
public: | ||
std::shared_ptr<SchedulingDecision> makeSchedulingDecision( | ||
HostMap& hostMap, | ||
const InFlightReqs& inFlightReqs, | ||
std::shared_ptr<faabric::BatchExecuteRequest> req) override; | ||
|
||
private: | ||
bool isFirstDecisionBetter( | ||
std::shared_ptr<SchedulingDecision> decisionA, | ||
std::shared_ptr<SchedulingDecision> decisionB) override; | ||
|
||
bool isFirstDecisionBetter(HostMap& hostMap, | ||
std::shared_ptr<SchedulingDecision> decisionA, | ||
std::shared_ptr<SchedulingDecision> decisionB); | ||
|
||
std::vector<Host> getSortedHosts( | ||
HostMap& hostMap, | ||
const InFlightReqs& inFlightReqs, | ||
std::shared_ptr<faabric::BatchExecuteRequest> req, | ||
const DecisionType& decisionType) override; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.