Skip to main content

Topology

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.

Code

The code related to reading and processing topology files can be found here

Schema

The schema for the topology file is provided in schema. In the following section, we describe the different components of the schema.

Cluster

variabletyperequired?defaultdescription
namestringnoClusterThe name of the cluster. This is only important for debugging and post-processing
countintegerno1The amount of clusters of this type are in the data center
hostsList[Host]yesN/AA list of the hosts in a cluster.

Host

variabletyperequired?defaultdescription
namestringnoHostThe name of the host. This is only important for debugging and post-processing
countintegerno1The amount of hosts of this type are in the cluster
cpuModelCPUyesN/AThe CPUs in the host
memoryMemoryyesN/AThe memory used by the host
power modelPower ModelyesN/AThe power model used to determine the power draw of the host

CPU

variabletypeUnitrequired?defaultdescription
namestringN/AnounknownThe name of the CPU.
vendorstringN/AnounknownThe vendor of the CPU
archstringN/Anounknownthe micro-architecture of the CPU
countintegerN/Ano1The amount of cpus of this type used by the host
coreCountintegercountyesN/AThe number of cores in the CPU
coreSpeedDoubleMhzyesN/AThe speed of each core in Mhz

Memory

variabletypeUnitrequired?defaultdescription
namestringN/AnounknownThe name of the CPU.
vendorstringN/AnounknownThe vendor of the CPU
archstringN/Anounknownthe micro-architecture of the CPU
countintegerN/Ano1The amount of cpus of this type used by the host
memorySizeintegerByteyesN/AThe number of cores in the CPU
memorySpeedDouble?no-1The speed of each core in Mhz. PLACEHOLDER: this currently does nothing.

Power Model

variabletypeUnitrequired?defaultdescription
vendorstringN/AyesN/AThe type of model used to determine power draw
modelNamestringN/AyesN/AThe type of model used to determine power draw
archstringN/AyesN/AThe type of model used to determine power draw
totalPowerInt64Wattnomax longThe power draw of a host when using max capacity in Watt
carbonTracePathstringN/AnonullPath 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.

Simple

The simplest data center that can be provided to OpenDC is shown below:

{
"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:

{
"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:

{
"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.

{
"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"
}
}
]
}
]
}