-
Notifications
You must be signed in to change notification settings - Fork 7
Example setup #33
Comments
The simulator is unfortunately pretty tightly coupled to the database (or at least Hibernate) at the moment, so my apologies for the trouble you are having to go through. But to get back on point, examples of such a setup file and accompanying traces can be found in the SC18 release. An example of such a setup file: {
"name": "Experimental Setup 2",
"rooms": [
{
"type": "SERVER",
"objects": [
{
"type": "RACK",
"machines": [
{ "cpus": [2] }, { "cpus": [2]},
{ "cpus": [2] }, { "cpus": [2]},
{ "cpus": [2] }, { "cpus": [2]},
{ "cpus": [2] }, { "cpus": [2]},
{ "cpus": [2] }, { "cpus": [2]},
{ "cpus": [2] }, { "cpus": [2]},
{ "cpus": [2] }, { "cpus": [2]},
{ "cpus": [2] }, { "cpus": [2]}
]
},
{
"type": "RACK",
"machines": [
{ "cpus": [1] }, { "cpus": [1]},
{ "cpus": [1] }, { "cpus": [1]},
{ "cpus": [1] }, { "cpus": [1]},
{ "cpus": [1] }, { "cpus": [1]},
{ "cpus": [1] }, { "cpus": [1]},
{ "cpus": [1] }, { "cpus": [1]},
{ "cpus": [1] }, { "cpus": [1]},
{ "cpus": [1] }, { "cpus": [1]}
]
}
]
}
]
} This is a JSON file that models a very basic datacenter (like you can construct on opendc.org). This datacenter contains a single server room with two racks:
The two CPU types available in this format are:
We are at the moment actively working on establishing a (documented) format for describing datacenter environments and will be implementing it in OpenDC to make these things a bit more easier in the future. |
@fabianishere thanks still will give us a good starting point. |
Hi @fabianishere I have some more questions, I hope you don't mind I'm reusing this issue for them. We're implementing a new Now my question how can we access those CPU details in a If you need more information please ask, or alternatively I can share the changes we've made so far (can't do that publicly (yet)). |
Hi @Thomasdezeeuw, no problem! Notice line 99 in Line 99 in 756bc12
Here, model.run brings the methods from TopologyContext into scope.
You can do something similar to access the CPU details in a class MySortingPolicy : TaskSortingPolicy {
override suspend fun sort(tasks: List<Task>): List<Task> =
context<StageScheduler.State, OdcModel>().run {
model.run {
...
val cpus = machine.outgoingEdges.destinations<Cpu>("cpu")
...
}
}
} Not the most elegant code unfortunately, but it will do for now :P |
Thanks @fabianishere for all your help we've completed our lab, so this can be closed. |
We're doing the Lab exercise for Distributed Systems, at the VU, and we're having trouble creating a setup file for the
SC18PlatformRunner
. We've tried the website, but that failed (see atlarge-research/opendc-frontend#66). We've also foundSc18SetupParser
, but its somewhat hard to reverse-engineer a good setup from that.Could you provide an example setup file? Or provide/link to documentation on the format of this setup file?
The text was updated successfully, but these errors were encountered: