Skip to content

Commit 5497d05

Browse files
authored
threads: elastically scale-up (#418)
* threads: elastically scale-up * gh: bump code version * threads: handle zero-sized requests and preload a la mpi * omp: fix race conditions with elastic scaling
1 parent 8b5bd8e commit 5497d05

File tree

10 files changed

+263
-47
lines changed

10 files changed

+263
-47
lines changed

.env

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FAABRIC_VERSION=0.19.0
2-
FAABRIC_CLI_IMAGE=faasm.azurecr.io/faabric:0.19.0
1+
FAABRIC_VERSION=0.20.0
2+
FAABRIC_CLI_IMAGE=faasm.azurecr.io/faabric:0.20.0
33
COMPOSE_PROJECT_NAME=faabric-dev
44
CONAN_CACHE_MOUNT_SOURCE=./conan-cache/

.github/workflows/tests.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
if: github.event.pull_request.draft == false
2121
runs-on: ubuntu-latest
2222
container:
23-
image: faasm.azurecr.io/faabric:0.19.0
23+
image: faasm.azurecr.io/faabric:0.20.0
2424
env:
2525
DEPLOYMENT_TYPE: gha-ci
2626
steps:
@@ -34,7 +34,7 @@ jobs:
3434
if: github.event.pull_request.draft == false
3535
runs-on: ubuntu-latest
3636
container:
37-
image: faasm.azurecr.io/faabric:0.19.0
37+
image: faasm.azurecr.io/faabric:0.20.0
3838
steps:
3939
- name: "Check out code"
4040
uses: actions/checkout@v4
@@ -45,7 +45,7 @@ jobs:
4545
if: github.event.pull_request.draft == false
4646
runs-on: ubuntu-latest
4747
container:
48-
image: faasm.azurecr.io/faabric:0.19.0
48+
image: faasm.azurecr.io/faabric:0.20.0
4949
steps:
5050
- name: "Check out code"
5151
uses: actions/checkout@v4
@@ -65,7 +65,7 @@ jobs:
6565
REDIS_QUEUE_HOST: redis
6666
REDIS_STATE_HOST: redis
6767
container:
68-
image: faasm.azurecr.io/faabric:0.19.0
68+
image: faasm.azurecr.io/faabric:0.20.0
6969
options: --privileged
7070
services:
7171
redis:
@@ -104,7 +104,7 @@ jobs:
104104
REDIS_QUEUE_HOST: redis
105105
REDIS_STATE_HOST: redis
106106
container:
107-
image: faasm.azurecr.io/faabric:0.19.0
107+
image: faasm.azurecr.io/faabric:0.20.0
108108
options: --privileged
109109
services:
110110
redis:
@@ -156,7 +156,7 @@ jobs:
156156
REDIS_QUEUE_HOST: redis
157157
REDIS_STATE_HOST: redis
158158
container:
159-
image: faasm.azurecr.io/faabric:0.19.0
159+
image: faasm.azurecr.io/faabric:0.20.0
160160
services:
161161
redis:
162162
image: redis

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.19.0
1+
0.20.0

src/batch-scheduler/BinPackScheduler.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,13 @@ std::shared_ptr<SchedulingDecision> BinPackScheduler::makeSchedulingDecision(
307307
auto decisionType = getDecisionType(inFlightReqs, req);
308308
auto sortedHosts = getSortedHosts(hostMap, inFlightReqs, req, decisionType);
309309

310+
// For an OpenMP request with the single host hint, we only consider
311+
// scheduling in one VM
312+
bool isOmp = req->messages_size() > 0 && req->messages(0).isomp();
313+
if (req->singlehosthint() && isOmp) {
314+
sortedHosts.erase(sortedHosts.begin() + 1, sortedHosts.end());
315+
}
316+
310317
// Assign slots from the list (i.e. bin-pack)
311318
auto it = sortedHosts.begin();
312319
int numLeftToSchedule = req->messages_size();

src/batch-scheduler/SchedulingDecision.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ bool SchedulingDecision::isSingleHost() const
1515

1616
std::string thisHost = conf.endpointHost;
1717
std::set<std::string> hostSet(hosts.begin(), hosts.end());
18-
return hostSet.size() == 1;
18+
return hostSet.size() <= 1;
1919
}
2020

2121
void SchedulingDecision::addMessage(const std::string& host,

0 commit comments

Comments
 (0)