... | @@ -354,27 +354,30 @@ As can be seen from the above fragment, the JSON report comprises an array named |
... | @@ -354,27 +354,30 @@ As can be seen from the above fragment, the JSON report comprises an array named |
|
|
|
|
|
### Optimum Checkpoint Interval Recommendation
|
|
### Optimum Checkpoint Interval Recommendation
|
|
|
|
|
|
This web service is responsible for calculating the checkpoint interval of long loops, i.e., the checkpoint interval that strikes a satisfactory balance between reliability, performance, and energy consumption. It is actually an impelemntation of the novel mathematical model that was introduced as part of the SDK4ED Project. The calculation of the Optimum Checkpoint intervals is achieved through a dedicated API exposed by the RESTful web server, which is, in fact, a simple HTTP POST request. Several inputs need to be provided as parameters to this request. These parameters are listed below:
|
|
This web service is responsible for calculating the checkpoint interval of long loops, i.e., the checkpoint interval that strikes a satisfactory balance between reliability, performance, and energy consumption. It is actually an implementation of the novel mathematical model that was introduced as a part of the SDK4ED Project. The calculation of the Optimum Checkpoint intervals is achieved through a dedicated API exposed by the RESTful web server, which is, in fact, a simple HTTP POST request. Several inputs need to be provided as parameters to this request. Some of them are provided by using the analysis made by the Energy Toolbox. The most important ones are the ones connected to cost of a single instruction in energy consumption unit and execution time unit. Necessary parameters are listed below:
|
|
|
|
|
|
* **CalcType**– Sets the type of calculation of Optimal Checkpoints. For now we may calculate sequential program and program with long loop.
|
|
* **ProgramType**– Sets the type of calculation of Optimal Checkpoints. For now we may examine sequential program and program with long loop.
|
|
* **g** – Failure probability of single instruction
|
|
* **g** – Failure probability of a single instruction
|
|
* **B0e** – constant cost in time of starting the program
|
|
* **B0e** – constant cost in terms energy of starting the program
|
|
* **B0c** – constant cost in time of starting the program
|
|
* **B0c** – constant cost in terms of time of starting the program
|
|
* **L**– length of single long loop
|
|
* **L**– length of a single long loop
|
|
* **ce**– cost of a single instruction in relative energy consumption unit
|
|
* **ce**– cost of a single instruction in relative energy consumption unit
|
|
* **cc**– cost of single instruction in relative execution time unit
|
|
* **cc**– cost of a single instruction in relative execution time unit
|
|
* **b0c** – constant execution time cost after failure occurs
|
|
* **b0c** – constant execution time cost after failure occurs
|
|
* **b1c**– execution time cost related to executed instructions
|
|
* **b1c**– execution time cost related to executed instructions
|
|
* **b0e**– constant energy consumption cost after failure occurs
|
|
* **b0e**– constant energy consumption cost after failure occurs
|
|
* **b1e**– energy consumption cost related to executed instructions
|
|
* **b1e**– energy consumption cost related to executed instructions
|
|
* **N** – number of checkpoints
|
|
* **N** – number of checkpoints
|
|
* **alfa**– value representing how calculations relate to Energy consumption
|
|
* **alfa**– importance representing how calculations relate to energy consumption
|
|
* **beta**– values representing how calculations relate to Execution Time
|
|
* **beta**– importance representing how calculations relate to execution Time
|
|
* **B1e**– energy consumption cost before failure occurs related to single instruction
|
|
* **B1e**– energy consumption cost before failure occurs related to single instruction
|
|
* **B1c** – execution time cost before failure occurs related to single instruction
|
|
* **B1c** – execution time cost before failure occurs related to single instruction
|
|
* **Y**– Total fixed number of instructions
|
|
* **Y**– Total fixed number of instructions
|
|
|
|
* **username**- The *Git Username* field from the settings of the project on the *projects page.*
|
|
|
|
* **project_name**- The *Project Name* field from the settings of the project on the *projects page.*
|
|
|
|
* **historyData**- Indication whether the new analysis should be performed or not.
|
|
|
|
|
|
After server receives request it calculates data and responds with JSON. In this message there are data needed to present graphs and data on the webpage. JSON data sent from the server consist of 5 JSON objects:
|
|
After server receives request it calculates data and responds with JSON. In this message there are data needed to present graphs and data on the webpage. JSON data sent from the server consist of 8 JSON objects:
|
|
|
|
|
|
* **energyConsumptionOverNumberOfInstructions**: provides data needed to present graph of energy consumption when checkpoints are used.
|
|
* **energyConsumptionOverNumberOfInstructions**: provides data needed to present graph of energy consumption when checkpoints are used.
|
|
* **executionTimeOverNumberOfInstruction**: provides data to present graph of execution time when checkpoints are used.
|
|
* **executionTimeOverNumberOfInstruction**: provides data to present graph of execution time when checkpoints are used.
|
... | @@ -387,6 +390,10 @@ After server receives request it calculates data and responds with JSON. In this |
... | @@ -387,6 +390,10 @@ After server receives request it calculates data and responds with JSON. In this |
|
* **nStarIndex**: stores index of best execution time result
|
|
* **nStarIndex**: stores index of best execution time result
|
|
* **nStarValue**: stores value of best execution time result
|
|
* **nStarValue**: stores value of best execution time result
|
|
|
|
|
|
|
|
* **username**: The *Git Username* field from the settings of the project on the *projects page.*
|
|
|
|
* **project_name**: The *Project Name* field from the settings of the project on the *projects page.*
|
|
|
|
* **timestamp**: The timestamp of last performed calculations.
|
|
|
|
|
|
For better understanding, an example is presented in the following demonstrating how the *Optimum Checkpoint Interval Recommendation* web service can be invoked for calculating the optimum checkpoint interval of a given loop.
|
|
For better understanding, an example is presented in the following demonstrating how the *Optimum Checkpoint Interval Recommendation* web service can be invoked for calculating the optimum checkpoint interval of a given loop.
|
|
|
|
|
|
|
|
|
... | @@ -400,90 +407,91 @@ Having the following JSON Body: |
... | @@ -400,90 +407,91 @@ Having the following JSON Body: |
|
|
|
|
|
```
|
|
```
|
|
{
|
|
{
|
|
"ProgramType":"FiniteRuntime",
|
|
B0c: "0.00000347"
|
|
"g":0.000005,
|
|
B0e: "0.00000059"
|
|
"Be":500.0,
|
|
B1c: "0.0"
|
|
"L":100.0,
|
|
B1e: "0.0"
|
|
"ce":0.00001,
|
|
L: "1"
|
|
"b0e":100.0,
|
|
N: "200.0"
|
|
"b1e":10.0,
|
|
ProgramType: "OptimalCheckpoints"
|
|
"N":10000.0,
|
|
Y: "19782.0"
|
|
"g":0.000005,
|
|
alfa: "1.0"
|
|
"B":100000.0,
|
|
b0c: "0.000000077"
|
|
"L":100.0,
|
|
b0e: "0.000000367"
|
|
"c":1.0,
|
|
b1c: "0.0000000007"
|
|
"b0":100.0,
|
|
b1e: "0.00000000367"
|
|
"b1":10.0
|
|
beta: "1.0"
|
|
|
|
cc: "0.00891"
|
|
|
|
ce: "2.884e-05"
|
|
|
|
g: "0.000005"
|
|
|
|
history_data: "1.0"
|
|
|
|
project_name: "Neurasmus"
|
|
|
|
username: siavvasm@iti.gr
|
|
}
|
|
}
|
|
|
|
|
|
```
|
|
```
|
|
|
|
|
|
This leads to the following JSON Response:
|
|
This leads to the following JSON Response:
|
|
|
|
|
|
```
|
|
```
|
|
{
|
|
{
|
|
"energyConsumptionTable": {
|
|
"_id" : { "$oid" : "5fcf6b2952faff146a417eb6" },
|
|
"columns": [
|
|
"energyConsumptionTable" :
|
|
{
|
|
{ "columns" :
|
|
"field": "y",
|
|
[
|
|
"label": "Energy Consumption"
|
|
{ "field" : "y", "label" : "Energy consumption" },
|
|
},
|
|
{ "field" : "x", "label" : "Number of loop repetitions between checkpoints" }
|
|
{
|
|
],
|
|
"field": "x",
|
|
"rows" :
|
|
"label": "Number of Instructions"
|
|
[
|
|
}
|
|
{ "x" : 1, "y" : 0.008913514551 },
|
|
]
|
|
...
|
|
},
|
|
{ "x" : 200, "y" : 0.008914496133 }] },
|
|
"calculationSummary": {
|
|
"calculationSummary" : {
|
|
"nPlusIndex": 42,
|
|
"nPlusIndex" : 12,
|
|
"nStarValue": 2.0402034010454506E7,
|
|
"nStarValue" : 2.885312E-5,
|
|
"nStarIndex": 1999,
|
|
"nStarIndex" : 90,
|
|
"nPlusValue": 225200.35453072865
|
|
"nPlusValue" : 0.008910578749 },
|
|
},
|
|
"executionTimeOverNumberOfInstructions" :
|
|
"executionTimeOverNumberOfInstructions": [
|
|
[
|
|
{
|
|
{
|
|
"mode": "line",
|
|
"mode" : "line",
|
|
"margin": {
|
|
"margin" : { "r" : 20, "b" : 50, "t" : 50, "l" : 20 },
|
|
"r": 20,
|
|
"marker" : { "color" : "red" },
|
|
"b": 50,
|
|
"x" : [1, ... , 200],
|
|
"t": 50,
|
|
"y" : [2.9430146E-5, ... , 2.8857451E-5],
|
|
"l": 20
|
|
"type" : "scatter",
|
|
},
|
|
"autosize" : "true"
|
|
"marker": {
|
|
|
|
"color": "red"
|
|
|
|
},
|
|
|
|
"type": "scatter",
|
|
|
|
"autosize": "true"
|
|
|
|
}
|
|
}
|
|
],
|
|
],
|
|
"executionTimeTable": {
|
|
"executionTimeTable" :
|
|
"columns": [
|
|
|
|
{
|
|
|
|
"field": "y",
|
|
|
|
"label": "Execution Time"
|
|
|
|
},
|
|
|
|
{
|
|
{
|
|
"field": "x",
|
|
"columns" :
|
|
"label": "Number of Instructions"
|
|
[
|
|
}
|
|
{ "field" : "y", "label" : "Execution time" },
|
|
|
|
{ "field" : "x", "label" : "Number of loop repetitions between checkpoints" }
|
|
|
|
],
|
|
|
|
"rows" :
|
|
|
|
[
|
|
|
|
{ "x" : 1, "y" : 2.9430146E-5 },
|
|
|
|
{ "x" : 200, "y" : 2.8857451E-5 }
|
|
]
|
|
]
|
|
},
|
|
},
|
|
"energyConsumptionOverNumberOfInstructions": [
|
|
"energyConsumptionOverNumberOfInstructions" :
|
|
{
|
|
[
|
|
"mode": "line",
|
|
{
|
|
"margin": {
|
|
"mode" : "line",
|
|
"r": 20,
|
|
"margin" : { "r" : 20, "b" : 50, "t" : 50, "l" : 20 },
|
|
"b": 50,
|
|
"marker" : { "color" : "red" },
|
|
"t": 50,
|
|
"x" : [1, .. , 200],
|
|
"l": 20
|
|
"y" : [0.008913514551, ... , 0.008914496133],
|
|
},
|
|
"type" : "scatter",
|
|
"marker": {
|
|
"autosize" : "true" }],
|
|
"color": "red"
|
|
"username" : "siavvasm@iti.gr",
|
|
},
|
|
"project_name" : "Neurasmus",
|
|
"type": "scatter",
|
|
"timestamp" : "December 8, 2020 12:01 PM"
|
|
"autosize": "true"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
}
|
|
|
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
|
... | | ... | |