1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
The topology of a datacenter is defined using a JSON file. A topology consist of one or more clusters.
Each cluster consist of at least one host on which jobs can be executed. Each host consist of one or more CPUs,
a memory unit and a power model.
:::info Code
The code related to reading and processing topology files can be found [here](https://github.com/atlarge-research/opendc/tree/master/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology)
:::
## Schema
The schema for the topology file is provided in [schema](TopologySchema).
In the following section, we describe the different components of the schema.
### Cluster
| variable | type | required? | default | description |
|----------|---------------------|-----------|---------|-----------------------------------------------------------------------------------|
| name | string | no | Cluster | The name of the cluster. This is only important for debugging and post-processing |
| count | integer | no | 1 | The amount of clusters of this type are in the data center |
| hosts | List[[Host](#host)] | yes | N/A | A list of the hosts in a cluster. |
### Host
| variable | type | required? | default | description |
|-------------|-----------------------------|-----------|---------|--------------------------------------------------------------------------------|
| name | string | no | Host | The name of the host. This is only important for debugging and post-processing |
| count | integer | no | 1 | The amount of hosts of this type are in the cluster |
| cpuModel | [CPU](#cpu) | yes | N/A | The CPUs in the host |
| memory | [Memory](#memory) | yes | N/A | The memory used by the host |
| power model | [Power Model](#power-model) | yes | N/A | The power model used to determine the power draw of the host |
### CPU
| variable | type | Unit | required? | default | description |
|-----------|---------|-------|-----------|---------|--------------------------------------------------|
| name | string | N/A | no | unknown | The name of the CPU. |
| vendor | string | N/A | no | unknown | The vendor of the CPU |
| arch | string | N/A | no | unknown | the micro-architecture of the CPU |
| count | integer | N/A | no | 1 | The amount of cpus of this type used by the host |
| coreCount | integer | count | yes | N/A | The number of cores in the CPU |
| coreSpeed | Double | Mhz | yes | N/A | The speed of each core in Mhz |
### Memory
| variable | type | Unit | required? | default | description |
|-------------|---------|------|-----------|---------|--------------------------------------------------------------------------|
| name | string | N/A | no | unknown | The name of the CPU. |
| vendor | string | N/A | no | unknown | The vendor of the CPU |
| arch | string | N/A | no | unknown | the micro-architecture of the CPU |
| count | integer | N/A | no | 1 | The amount of cpus of this type used by the host |
| memorySize | integer | Byte | yes | N/A | The number of cores in the CPU |
| memorySpeed | Double | ? | no | -1 | The speed of each core in Mhz. PLACEHOLDER: this currently does nothing. |
### Power Model
| variable | type | Unit | required? | default | description |
|-----------------|--------|------|-----------|----------|-------------------------------------------------------------------------------|
| vendor | string | N/A | yes | N/A | The type of model used to determine power draw |
| modelName | string | N/A | yes | N/A | The type of model used to determine power draw |
| arch | string | N/A | yes | N/A | The type of model used to determine power draw |
| totalPower | Int64 | Watt | no | max long | The power draw of a host when using max capacity in Watt |
| carbonTracePath | string | N/A | no | null | Path to a carbon intensity trace. If not given, carbon intensity is always 0. |
## Examples
In the following section, we discuss several examples of topology files. Any topology file can be verified using the
JSON schema defined in [schema](TopologySchema).
### Simple
The simplest data center that can be provided to OpenDC is shown below:
```json
{
"clusters": [
{
"hosts": [
{
"cpu":
{
"coreCount": 16,
"coreSpeed": 1000
},
"memory": {
"memorySize": 100000
}
}
]
}
]
}
```
This creates a data center with a single cluster containing a single host. This host consist of a single 16 core CPU
with a speed of 1 Ghz, and 100 MiB RAM memory.
### Count
Duplicating clusters, hosts, or CPUs is easy using the "count" keyword:
```json
{
"clusters": [
{
"count": 2,
"hosts": [
{
"count": 5,
"cpu":
{
"coreCount": 16,
"coreSpeed": 1000,
"count": 10
},
"memory":
{
"memorySize": 100000
}
}
]
}
]
}
```
This topology creates a datacenter consisting of 2 clusters, both containing 5 hosts. Each host contains 10 16 core
CPUs.
Using "count" saves a lot of copying.
### Complex
Following is an example of a more complex topology:
```json
{
"clusters": [
{
"name": "C01",
"count": 2,
"hosts": [
{
"name": "H01",
"count": 2,
"cpus": [
{
"coreCount": 16,
"coreSpeed": 1000
}
],
"memory": {
"memorySize": 1000000
},
"powerModel": {
"modelType": "linear",
"idlePower": 200.0,
"maxPower": 400.0
}
},
{
"name": "H02",
"count": 2,
"cpus": [
{
"coreCount": 8,
"coreSpeed": 3000
}
],
"memory": {
"memorySize": 100000
},
"powerModel": {
"modelType": "square",
"idlePower": 300.0,
"maxPower": 500.0
}
}
]
}
]
}
```
This topology defines two types of hosts with different coreCount, and coreSpeed.
Both types of hosts are created twice.
### With Units of Measure
Aside from using number to indicate values it is also possible to define values using strings. This allows the user to define the unit of the input parameter.
```json
{
"clusters": [
{
"count": 2,
"hosts" :
[
{
"name": "H01",
"cpuModel":
{
"coreCount": 8,
"coreSpeed": "3.2 Ghz"
},
"memory": {
"memorySize": "128e3 MiB",
"memorySpeed": "1 Mhz"
},
"powerModel": {
"modelType": "linear",
"power": "400 Watts",
"maxPower": "1 KW",
"idlePower": "0.4 W"
}
}
]
}
]
}
```
|