* Initial work on rapl-daemon. Initial server set up. API to read max power per zone and API to write new power cap have both been written. * Removing python script since this has been ported to go code now. * Adding test for happy path retrieving max power. * Change some data types around to avoid too much conversion. * Add happy path test for cap zone * Removing uncessary print statement. * Change cap node to use a temporary setup. * Renaming arguments to be more descriptive. * Changing todo message. * Changing test structure to only set up mock subsystem once and allowing functions to test on it later. * Adding some more coverage for unhappy paths and fixing some values to reflect they are no longer floats. * Keeping the old script around as it should be removed in a different PR. * Delegating percentage check to capNode function. * Fixing typo. * Fixing typos. * Changing shortWindow to longWindow as constraint_0 actually points to the long window. * Renaming variable in test. * capping funciton now returns which zones were sucessfully capped and which zones could not be capped. This information is now returned to the caller of the HTTP api.
39 lines
No EOL
782 B
Markdown
39 lines
No EOL
782 B
Markdown
# RAPL Daemon
|
|
|
|
This runs a server that is capable of changing the percentage at which
|
|
a node is being throttled to using RAPL. This daemon should be installed
|
|
on all worker nodes.
|
|
|
|
### Sample payload for testing:
|
|
```
|
|
curl --header "Content-Type: application/json" \
|
|
--request POST \
|
|
--data '{"percentage":75}' \
|
|
http://localhost:9090/powercap
|
|
```
|
|
|
|
### Payload
|
|
|
|
```json
|
|
{
|
|
"percentage":75
|
|
}
|
|
```
|
|
|
|
### Response
|
|
|
|
The daemon will respond with a json payload containing zones that were
|
|
successfully capped as well as the zones that were not capped.
|
|
|
|
```json
|
|
{
|
|
"cappedZones": null,
|
|
"failedZones": [
|
|
"intel-rapl:0",
|
|
"intel-rapl:1"
|
|
],
|
|
"error": "some zones were not able to be powercapped"
|
|
}
|
|
```
|
|
|
|
Field error will not exist if failed zones is empty. |