... | ... | @@ -354,27 +354,30 @@ As can be seen from the above fragment, the JSON report comprises an array named |
|
|
|
|
|
### 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.
|
|
|
* **g** – Failure probability of single instruction
|
|
|
* **B0e** – constant cost in time of starting the program
|
|
|
* **B0c** – constant cost in time of starting the program
|
|
|
* **L**– length of single 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 a single instruction
|
|
|
* **B0e** – constant cost in terms energy of starting the program
|
|
|
* **B0c** – constant cost in terms of time of starting the program
|
|
|
* **L**– length of a single long loop
|
|
|
* **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
|
|
|
* **b1c**– execution time cost related to executed instructions
|
|
|
* **b0e**– constant energy consumption cost after failure occurs
|
|
|
* **b1e**– energy consumption cost related to executed instructions
|
|
|
* **N** – number of checkpoints
|
|
|
* **alfa**– value representing how calculations relate to Energy consumption
|
|
|
* **beta**– values representing how calculations relate to Execution Time
|
|
|
* **alfa**– importance representing how calculations relate to energy consumption
|
|
|
* **beta**– importance representing how calculations relate to execution Time
|
|
|
* **B1e**– energy consumption 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
|
|
|
* **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.
|
|
|
* **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 |
|
|
* **nStarIndex**: stores index 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.
|
|
|
|
|
|
|
... | ... | @@ -400,90 +407,91 @@ Having the following JSON Body: |
|
|
|
|
|
```
|
|
|
{
|
|
|
"ProgramType":"FiniteRuntime",
|
|
|
"g":0.000005,
|
|
|
"Be":500.0,
|
|
|
"L":100.0,
|
|
|
"ce":0.00001,
|
|
|
"b0e":100.0,
|
|
|
"b1e":10.0,
|
|
|
"N":10000.0,
|
|
|
"g":0.000005,
|
|
|
"B":100000.0,
|
|
|
"L":100.0,
|
|
|
"c":1.0,
|
|
|
"b0":100.0,
|
|
|
"b1":10.0
|
|
|
B0c: "0.00000347"
|
|
|
B0e: "0.00000059"
|
|
|
B1c: "0.0"
|
|
|
B1e: "0.0"
|
|
|
L: "1"
|
|
|
N: "200.0"
|
|
|
ProgramType: "OptimalCheckpoints"
|
|
|
Y: "19782.0"
|
|
|
alfa: "1.0"
|
|
|
b0c: "0.000000077"
|
|
|
b0e: "0.000000367"
|
|
|
b1c: "0.0000000007"
|
|
|
b1e: "0.00000000367"
|
|
|
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:
|
|
|
|
|
|
```
|
|
|
{
|
|
|
"energyConsumptionTable": {
|
|
|
"columns": [
|
|
|
{
|
|
|
"field": "y",
|
|
|
"label": "Energy Consumption"
|
|
|
},
|
|
|
{
|
|
|
"field": "x",
|
|
|
"label": "Number of Instructions"
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
"calculationSummary": {
|
|
|
"nPlusIndex": 42,
|
|
|
"nStarValue": 2.0402034010454506E7,
|
|
|
"nStarIndex": 1999,
|
|
|
"nPlusValue": 225200.35453072865
|
|
|
},
|
|
|
"executionTimeOverNumberOfInstructions": [
|
|
|
{
|
|
|
"mode": "line",
|
|
|
"margin": {
|
|
|
"r": 20,
|
|
|
"b": 50,
|
|
|
"t": 50,
|
|
|
"l": 20
|
|
|
},
|
|
|
"marker": {
|
|
|
"color": "red"
|
|
|
},
|
|
|
"type": "scatter",
|
|
|
"autosize": "true"
|
|
|
}
|
|
|
],
|
|
|
"executionTimeTable": {
|
|
|
"columns": [
|
|
|
{
|
|
|
"field": "y",
|
|
|
"label": "Execution Time"
|
|
|
},
|
|
|
{
|
|
|
"field": "x",
|
|
|
"label": "Number of Instructions"
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
"energyConsumptionOverNumberOfInstructions": [
|
|
|
{
|
|
|
"mode": "line",
|
|
|
"margin": {
|
|
|
"r": 20,
|
|
|
"b": 50,
|
|
|
"t": 50,
|
|
|
"l": 20
|
|
|
},
|
|
|
"marker": {
|
|
|
"color": "red"
|
|
|
},
|
|
|
"type": "scatter",
|
|
|
"autosize": "true"
|
|
|
}
|
|
|
]
|
|
|
{
|
|
|
"_id" : { "$oid" : "5fcf6b2952faff146a417eb6" },
|
|
|
"energyConsumptionTable" :
|
|
|
{ "columns" :
|
|
|
[
|
|
|
{ "field" : "y", "label" : "Energy consumption" },
|
|
|
{ "field" : "x", "label" : "Number of loop repetitions between checkpoints" }
|
|
|
],
|
|
|
"rows" :
|
|
|
[
|
|
|
{ "x" : 1, "y" : 0.008913514551 },
|
|
|
...
|
|
|
{ "x" : 200, "y" : 0.008914496133 }] },
|
|
|
"calculationSummary" : {
|
|
|
"nPlusIndex" : 12,
|
|
|
"nStarValue" : 2.885312E-5,
|
|
|
"nStarIndex" : 90,
|
|
|
"nPlusValue" : 0.008910578749 },
|
|
|
"executionTimeOverNumberOfInstructions" :
|
|
|
[
|
|
|
{
|
|
|
"mode" : "line",
|
|
|
"margin" : { "r" : 20, "b" : 50, "t" : 50, "l" : 20 },
|
|
|
"marker" : { "color" : "red" },
|
|
|
"x" : [1, ... , 200],
|
|
|
"y" : [2.9430146E-5, ... , 2.8857451E-5],
|
|
|
"type" : "scatter",
|
|
|
"autosize" : "true"
|
|
|
}
|
|
|
],
|
|
|
"executionTimeTable" :
|
|
|
{
|
|
|
"columns" :
|
|
|
[
|
|
|
{ "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" :
|
|
|
[
|
|
|
{
|
|
|
"mode" : "line",
|
|
|
"margin" : { "r" : 20, "b" : 50, "t" : 50, "l" : 20 },
|
|
|
"marker" : { "color" : "red" },
|
|
|
"x" : [1, .. , 200],
|
|
|
"y" : [0.008913514551, ... , 0.008914496133],
|
|
|
"type" : "scatter",
|
|
|
"autosize" : "true" }],
|
|
|
"username" : "siavvasm@iti.gr",
|
|
|
"project_name" : "Neurasmus",
|
|
|
"timestamp" : "December 8, 2020 12:01 PM"
|
|
|
}
|
|
|
|
|
|
```
|
|
|
|
|
|
|
... | ... | |