summaryrefslogtreecommitdiff
path: root/site/docs/documentation/Input/Topology
diff options
context:
space:
mode:
authorDante Niewenhuis <d.niewenhuis@hotmail.com>2025-05-16 10:32:08 +0200
committerGitHub <noreply@github.com>2025-05-16 10:32:08 +0200
commitd70312f122d9ef7c31b05757239ffc66af832dee (patch)
treec8eb5d86ce751b783c3f15744bcda35861eed65d /site/docs/documentation/Input/Topology
parent1bc17abd7691bc81f11ee125e2eeb4cb08da5245 (diff)
Updated website documentation (#334)
* Updated website documentation * Updated some documentation and fixed links * small updates * small updates
Diffstat (limited to 'site/docs/documentation/Input/Topology')
-rw-r--r--site/docs/documentation/Input/Topology/Battery.md37
-rw-r--r--site/docs/documentation/Input/Topology/Host.md55
-rw-r--r--site/docs/documentation/Input/Topology/PowerModel.md31
-rw-r--r--site/docs/documentation/Input/Topology/PowerSource.md20
-rw-r--r--site/docs/documentation/Input/Topology/Topology.md183
5 files changed, 326 insertions, 0 deletions
diff --git a/site/docs/documentation/Input/Topology/Battery.md b/site/docs/documentation/Input/Topology/Battery.md
new file mode 100644
index 00000000..70492694
--- /dev/null
+++ b/site/docs/documentation/Input/Topology/Battery.md
@@ -0,0 +1,37 @@
+Batteries can be used to store energy for later use.
+In previous work, we have used batteries to store energy from the grid when the carbon intensity is low,
+and use this energy when the carbon intensity is high.
+
+Batteries are defined using the following parameters:
+
+| variable | type | Unit | required? | default | description |
+|------------------|---------------------------|-------|-----------|---------|-----------------------------------------------------------------------------------|
+| name | string | N/A | no | Battery | The name of the battery. This is only important for debugging and post-processing |
+| capacity | Double | kWh | yes | N/A | The total amount of energy that the battery can hold. |
+| chargingSpeed | Double | W | yes | N/A | Charging speed of the battery. |
+| initialCharge | Double | kWh | no | 0.0 | The initial charge of the battery. If not given, the battery starts empty. |
+| batteryPolicy | [Policy](#battery-policy) | N/A | yes | N/A | The policy which decides when to charge and discharge. |
+| embodiedCarbon | Double | gram | no | 0.0 | The embodied carbon emitted while creating this battery. |
+| expectedLifetime | Double | Years | yes | 0.0 | The expected lifetime of the battery. |
+
+## Battery Policy
+To determine when to charge and discharge the battery, a policy is required.
+Currently, all policies for batteries are based on the carbon intensity of the grid.
+
+The best performing policy is called "runningMeanPlus" and is based on the running mean of the carbon intensity.
+it can be defined with the following JSON:
+
+```json
+{
+ "type": "runningMeanPlus",
+ "startingThreshold": 123.2,
+ "windowSize": 168
+}
+```
+
+In which `startingThreshold` is the initial carbon threshold used.
+`windowSize` is the size of the window used to calculate the running mean.
+
+:::info Alert
+This page with be extended with more text and policies in the future.
+:::
diff --git a/site/docs/documentation/Input/Topology/Host.md b/site/docs/documentation/Input/Topology/Host.md
new file mode 100644
index 00000000..7b5b8394
--- /dev/null
+++ b/site/docs/documentation/Input/Topology/Host.md
@@ -0,0 +1,55 @@
+A host is a machine that can execute tasks. A host consist of the following components:
+
+| 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](/docs/documentation/Input/Topology/PowerModel) | no | Default | The power model used to determine the power draw of the host |
+
+## CPU
+
+| variable | type | Unit | required? | default | description |
+|-----------|---------|-------|-----------|---------|--------------------------------------------------|
+| modelName | 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 number 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 |
+|-------------|---------|------|-----------|---------|--------------------------------------------------------------------------|
+| modelName | 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 |
+| memorySize | integer | Byte | yes | N/A | The number of cores in the CPU |
+| memorySpeed | Double | Mhz | no | -1 | The speed of each core in Mhz. PLACEHOLDER: this currently does nothing. |
+
+## Example
+
+```json
+{
+ "name": "H01",
+ "cpu": {
+ "coreCount": 16,
+ "coreSpeed": 2100
+ },
+ "memory": {
+ "memorySize": 100000
+ },
+ "powerModel": {
+ "modelType": "sqrt",
+ "idlePower": 32.0,
+ "maxPower": 180.0
+ },
+ "count": 100
+}
+```
+
+This example creates 100 hosts with 16 cores and 2.1 Ghz CPU speed, and 100 GB of memory.
+The power model used is a square root model with a power of 400 W, idle power of 32 W, and max power of 180 W.
+For more information on the power model, see [Power Model](/docs/documentation/Input/Topology/PowerModel).
diff --git a/site/docs/documentation/Input/Topology/PowerModel.md b/site/docs/documentation/Input/Topology/PowerModel.md
new file mode 100644
index 00000000..06f4a4da
--- /dev/null
+++ b/site/docs/documentation/Input/Topology/PowerModel.md
@@ -0,0 +1,31 @@
+OpenDC uses power models to determine the power draw based on the utilization of a host.
+All models in OpenDC are based on linear models interpolated between the idle and max power draw.
+OpenDC currently supports the following power models:
+1. **Constant**: The power draw is constant and does not depend on the utilization of the host.
+2. **Sqrt**: The power draw interpolates between idle and max using a square root function.
+3. **Linear**: The power draw interpolates between idle and max using a linear function.
+4. **Square**: The power draw interpolates between idle and max using a square function.
+5. **Cubic**The power draw interpolates between idle and max using a cubic function.
+
+The power model is defined using the following parameters:
+
+| variable | type | Unit | required? | default | description |
+|-----------|--------|------|-----------|---------|--------------------------------------------------------------------|
+| modelType | string | N/A | yes | N/A | The type of model used to determine power draw |
+| power | double | Mhz | no | 400 | The power draw of a host when using the constant power draw model. |
+| idlePower | double | Mhz | yes | N/A | The power draw of a host when idle in Watt. |
+| maxPower | double | Mhz | yes | N/A | The power draw of a host when using max capacity in Watt. |
+
+
+## Example
+
+```json
+{
+ "modelType": "sqrt",
+ "idlePower": 32.0,
+ "maxPower": 180.0
+}
+```
+
+This creates a power model that uses a square root function to determine the power draw of a host.
+The model uses an idle and max power of 32 W and 180 W respectively.
diff --git a/site/docs/documentation/Input/Topology/PowerSource.md b/site/docs/documentation/Input/Topology/PowerSource.md
new file mode 100644
index 00000000..993083dd
--- /dev/null
+++ b/site/docs/documentation/Input/Topology/PowerSource.md
@@ -0,0 +1,20 @@
+Each cluster has a power source that provides power to the hosts in the cluster.
+A user can connect a power source to a carbon trace to determine the carbon emissions during a workload.
+
+The power source consist of the following components:
+
+| variable | type | Unit | required? | default | description |
+|-----------------|--------------|------|-----------|----------------|-----------------------------------------------------------------------------------|
+| name | string | N/A | no | PowerSource | The name of the cluster. This is only important for debugging and post-processing |
+| maxPower | integer | Watt | no | Long.Max_Value | The total power that the power source can provide in Watt. |
+| carbonTracePath | path/to/file | N/A | no | null | A list of the hosts in a cluster. |
+
+## Example
+
+```json
+{
+ "carbonTracePath": "carbon_traces/AT_2021-2024.parquet"
+}
+```
+
+This example creates a power source with infinite power draw that uses the carbon trace from the file `carbon_traces/AT_2021-2024.parquet`.
diff --git a/site/docs/documentation/Input/Topology/Topology.md b/site/docs/documentation/Input/Topology/Topology.md
new file mode 100644
index 00000000..afc94e08
--- /dev/null
+++ b/site/docs/documentation/Input/Topology/Topology.md
@@ -0,0 +1,183 @@
+The topology of a datacenter defines all available hardware. Topologies are 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)
+:::
+
+In the following section, we describe the different components of a topology file.
+
+### 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](/docs/documentation/Input/Topology/Host)] | yes | N/A | A list of the hosts in a cluster. |
+| powerSource | [PowerSource](/docs/documentation/Input/Topology/PowerSource) | no | N/A | The power source used by all hosts connected to this cluster. |
+| battery | [Battery](/docs/documentation/Input/Topology/Battery) | no | null | The battery used by a cluster to store energy. When null, no batteries are used. |
+
+Hosts, power sources and batteries all require objects to use. See their respective pages for more information.
+
+## Examples
+
+In the following section, we discuss several examples of topology files.
+
+### 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
+ }
+ }
+ ],
+ "powerSource": {
+ "carbonTracePath": "carbon_traces/AT_2021-2024.parquet"
+ }
+ }
+ ]
+}
+```
+
+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
+ }
+ }
+ ],
+ "powerSource": {
+ "carbonTracePath": "carbon_traces/AT_2021-2024.parquet"
+ }
+ }
+ ]
+}
+```
+
+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"
+ }
+ }
+ ]
+ }
+ ]
+}
+```