# RFC-0005: Power monitoring and benchmarking [![hackmd-github-sync-badge](https://hackmd.io/Sclk564hSoifOmKUvjJdJw/badge)](https://hackmd.io/Sclk564hSoifOmKUvjJdJw) [TOC] This link will offer the option to download this RFC as a PDF. <a href="0005-power-monitoring.pdf" target="_blank" rel="noopener" class="print-pdf">Download as PDF</a> ## RFC Metadata **Authors** (in alphabetical order): - Tung Nguyen, [@SoffWolf](https://github.com/SoffWolf) - Lucas Käldström, [@luxas](https://github.com/luxas) **Status** (as defined [here]): `Provisional` [here]: https://github.com/kubernetes/enhancements/blob/master/keps/0001-kubernetes-enhancement-proposal-process.md#kep-metadata **Creation Date**: `2021-04-25` **Last Updated**: `2021-04-25` **RFC Handle**: `0005-power-monitoring` **Initial Pull Request**: [racklet/racklet#24](https://github.com/racklet/racklet/pull/24) **Tracking Issue**: [racklet/racklet#23](https://github.com/racklet/racklet/issues/23) ## Summary Benchmarking various Raspberry Pis in term of power consumption, performance, and efficiency. We want to correlate the power usage and of Raspberry Pis (and related SBCs) with the utilization TODO: * Overclocking vs power usage for various MHz * Temperature vs power usage for various heatsink confs (and room temperatures?) * CPU utilization vs power usage for various kinds of stress tests, and TODO: * Frequency, power usage & temperature logging, Phoromatic, in Phoronix ## Motivation Putting the best and the most effective product out for use needs various tests to be performed. ### Goals To understand and obtain the statistics about power consumption, performance, and efficiency of the most basic component that make up Racklet, **Raspberry Pis**. From these statistics, one should be able to infer the statistics of the Racklet as a whole and build the rack upon that knowledge. ### Non-Goals This work will not target on benchmarking the **Racklet as a whole**, which means other components of the rack, for example the BMC, won't be benchmarked. ## Proposal <!-- This is the technical portion of the RFC. Explain the design in sufficient detail that: - Its interaction with other features is clear. - It is reasonably clear how the feature would be implemented. - Corner cases are dissected by example. The section should return to the examples given in the guide-level explanation below, and explain more fully how the detailed proposal makes those examples work. --> **Power monitoring:** ... **Benchmarking:** The tests will be conducted in 2 main categories, synthetic test and real-life test: * Synthetic tests: various test from a benchmarking tool called Phoronix. The tests will target on different aspects of the Pi. For example: one test will focus on how temperature affects the performance of the machine, while another focuses on finding the correlation between CPU utilization and power consumption. * Real-life tests: hosting a machine learning model (image classification for example) on the Pis and make some inference with that model. Various metrics will be taken into account to assess the capability of the Pi in real life computing scenario, for example: the inference time, CPU utilization, RAM utilization. ### Values Having a deep understanding of the Raspberry Pi will help the user as well as development team understand the Racklet better. This understanding is valuable since it allow the user to know the capabilities of the rack, hence help them build their application on top of the rack and maintain it. Regarding the educational aspect of the project, this understanding will help the student learn about power usage, components' temperature, CPU utilization and many other metrics that you need to keep track of when operating a data center. ### User stories The user of this particular module should be anyone who use the Racklet, want to learn about how to build and maintain a data center, or simply want to know the capabilities of the Racklet to build their own application on top of the rack. ### Guide-level explanation Provide the <!-- Explain the proposal as if it was already a feature of the project and this would be the documentation for that feature. - Introducing new named concepts. - Explaining the feature largely in terms of examples. - If applicable, provide sample error messages, deprecation warnings, or migration guidance. - If applicable, describe the differences between teaching this to a Racklet administrator versus a Racklet end user. --> ### Risks and Mitigations What are the risks of this proposal and how do we mitigate. Think broadly. For example, consider both security and how this will impact the larger ecosystem. ## Drawbacks Why should we *not* do this? Consider at least one drawback. ## Rationale and alternatives - Why is this design the best in the space of possible designs? - What other designs have been considered and what is the rationale for not choosing them? - What is the impact of not doing this? ## Prior art Discuss prior art, both the good and the bad, in relation to this proposal. A few examples of what this can include are: - For community proposals: Is this done by some other community and what were their experiences with it? - For other teams: What lessons can we learn from what other communities have done here? - Papers: Are there any published papers or great posts that discuss this? If you have some relevant papers to refer to, this can serve as a more detailed theoretical background. This section is intended to encourage you as an author to think about the lessons from other projects and provide readers of your RFC with a fuller picture. If there is no prior art, that is fine - your ideas are interesting to us regardless of whether they are brand new or adaptations from other projects. ## Unresolved questions - What parts of the design do you expect to resolve through the RFC process before this gets merged? - What parts of the design do you expect to resolve through the implementation of this feature before stabilization? - What related issues do you consider out of scope for this RFC that could be addressed in the future independently of the solution that comes out of this RFC? ## Future possibilities Think about what the natural extension and evolution of your proposal would be and how it would affect the project as a whole in a holistic way. Try to use this section as a tool to more fully consider all possible interactions with the project in your proposal. Also consider how this all fits into the roadmap for the project. This is also a good place to "dump ideas", if they are out of scope for the RFC you are writing but otherwise related. If you have tried and cannot think of any future possibilities, you may simply state that you cannot think of anything. Note that having something written down in the future-possibilities section is not a reason to accept the current or a future RFC; such notes should be in the section on motivation or rationale in this or subsequent RFCs. The section merely provides additional information. ## Implementation History <!-- Major milestones in the lifecycle of a RFC should be tracked here. Major milestones might include: - The status of the RFC has been changed or another major to the RFC has been accepted. - The first Racklet version including an initial version of the RFC is released. - The Racklet version where the RFC graduated to general availability is released. - The RFC has been retired or superseded. -->