-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a way to generate function based on punctual consumption profile #86
Comments
@samuelrince I would be interested in your opinion. |
I have deep dived a little bit more using the original spreadsheet. Looks like making one logarithm-like function model per CPU "model" or "family" (Platinum, Gold, Silver, etc.) could be a good idea? PlatinumHere the red one is the line 6 from the spreadsheet, corresponding to c5.metal*. I don't know what the star means here neither why the red curve stands out that much. Looks like it should be on the other graph. GoldSilverE, E3, E5@da-ekchajzer, let me known what you think of this approach. I guess if can have the CPU model name we will have a better estimation of what the power consumption profile should look like for new CPU models. |
Also I don't understand the second table, it's not the power consumption per CPU architecture right?
|
The second table represents the medium consumption of a server depending on the CPU family (also called Architecture). My idea is to generate server consumption profiles at first per CPU family, until we gather data on specific CPU (and other components) to make consumption profile based on more precise data (number of core, CPU model, …). But either way we should come up with a generic way of generating a consumption profile from an When few points are given (in the case of the second table for instance) the consumption profile will be an affine function Example for Skylake family "workload":{
"0":0.6446044454253452,
"100": 4.193436438541878
}
consumption_profil(x) = ((100 - 0) / (4.193436438541878 - 0.6446044454253452)) * x + 0.6446044454253452 Yet, we know the consumption profile is not linear. Besides, with this approach, we won't come up with a function defined by its coefficient but with a set of affine function connecting a point to another. Cloud carbon footprint uses an affine equation (as saw above) to come up with an average watts' consumption I think with the AWS data from teads and the future data we'll have we can be more ambitious and generate more precise functions. What do you think of using a Does this make sense to you ? |
I think a logarithmic function is good enough to model the CPU power consumption given the workload, and I understand that often we will only have the min (idle) and max (100%) power consumption. The idea is to have a more precise model if we can have access to the CPU model. Precisely in Intel case, if we know the CPU is either Xeon Platinum, Xeon Gold, Xeon Silver we can use a different base model to compute the "Final model", based on min and max power consumption. Here is an example: We receive from the API, both the CPU model and workload as following: {
"cpu": {
"model": "Intel Xeon Platinum 8124M"
},
"workload": {
0: 51 <<< Power consumption in idle state (in W)
100: 413 <<< Power consumption in 100% state (in W)
}
} (Maybe not the actual json fields here) Given that we know it is a Xeon Platinum CPU and we can use a more precise model previously fitted on Xeon Platinum CPU data only, see the following: Here the white curve called "Platinum model" is a power consumption model inferred from all power consumption curves for Xeon Platinum CPUs. We can then build a second model called "Final model" using the "Platinum model" and min and max power consumption values. We build the following model in pink: (In blue it is the actual cpu power consumption model) In the case where we don't have the CPU model, but only min/max workload, we can use a default model (still a log function) built from the whole power consumption datasets. This method will give less precise values but still better than an affine function. The log function I use to fit in the data is:
I hope it is more clear what my idea is. Let me know if you think that it can be useful or if it is totally overkill. |
It is exactly what I was thinking but couldn't explain it so clearly. Thank you. I think we should work with
Could you explain the process with the equations to ease the implementation part. For example how do you define process summary1 - Input data {
"cpu" :{
"family":"skylake",
"nb_core":8
}
"workload":{
0: 51, <<< Power consumption in idle state (in W)
50: 293, <<< Power consumption in 50% state (in W)
100: 413 <<< Power consumption in 100% state (in W)
}
} 2 - Look for equivalent consumption profile If exist : Search for equivalent consumption profile with same family and core_number 3 - Infer the consumption profile for the current type of CPU ⇒ What magic are you doing here ? 4 - Generate the consumption profile equation from 1) the inferred curve and 2) the input data
|
The implementation is really easy, it is just using
The optimization done in I can provide you the POC in a notebook if you want? (I have to clean it a bit first).
The optimization process described above can work with 2 or more values. With more values we can expect a higher precision. Depending on the number of data points, we have it can be useful to start the optimization process from a base model (like the Platinum model) in that way we start with parameters that are already defined and we can just "try to shift the curve" until it meets min workload and max workload for instance.
I have tried to put the family (or architecture?) in front of each CPU, tell me if you see an error, but I think it is OK. It gives me that:
(I've removed the ones with * for now because I don't understand why they look so weird on the graphs...) Given that classification I can plot all CPU power consumption curves per family. Only one CPU for both Coffee Lake and Broadwell so I haven't plotted them. You see that on each graph we clearly have different CPU profiles even though they are from the same family/architecture. And on the first 2 graphs we can see that the Platinum ones are always close together at the top, then Gold ones, and then Silver ones at the bottom. That is why I first grouped them by CPU "model" (Platinum, Gold, Silver, E3, E5, E) because when you plot them together there profiles look very similar even though they are not from the same family/architecture or launch year. If we take into account the number of CPU cores in addition of the CPU architecture it is still not really satisfying: (The number after the CPU full name is the number of cores, e.g. "Intel Xeon Platinum 8275CL 24" cores) You have CPU with less cores over CPU with more cores and vice versa. Let me know of what you think, maybe it is a subject to discuss in a meeting? But in the end, at this stage I am only convinced by grouping CPUs by their "model". Of course, if we have more data we can then consider architecture and number of cores, but only within the same CPU model group. |
Thank you for the explanations. From your work it seems very clear that the CPU model is the best strategy. As you mentioned it would be nice to find data on other CPU (AMD for instance) to validate this. @github-benjamin-davy since this strategy is based on your data I think your opinion would be precious. I think a Jupyter notebook is a good input for the implementation if you can provide it. I thought we could begin to implement it as a route (POST /cpu/consumption_profil) which takes a CPU object and a workload object and returns the coefficient a, b, c of the function. The usage of the consumption profile will be implemented in #87 and #88 |
It makes me think that we should add a model CPU attribute :
I will modify #82 to make it possible to complete family and model from cpu name. |
Hello here, I'll try to catch up on the discussion, @samuelrince the * is simply used as a way to exclude some lines from the VLOOKUP in the spreadsheet (some lines refer to underclocked machines). I would say that the most essential characteristic of the CPU is its TDP which should most of the time be close to the max consumption from what I've experienced (however two CPUs with the same TDP might not have the exact same behavior). As you have seen, CPUs from the same family can have very different power consumption for the same number of cores (depends on voltage & frequency). |
Hey @da-ekchajzer you can take a look at this notebook as a working implementation. |
Implemented as a router for CPU in #113 |
Problem
A consumption profile is a function which associate a workload to an electrical_consumption :
consumption_profil(workload) = electrical_consumption
This continues function will be generated from punctual measures on different workload for a given configuration. The punctual measure could come from our measurement or from secondary sources.
We want to provide a way to generate continuous consumption profiles (function) from those punctual measures. Such process could be used for device or components usage impacts evaluation.
Solution
We should set up a regression process. We call regression the process of defining a continuous relationship (function) between workload and electrical_consumption based on a punctual measurement.
Regression shouldn't be linear. From what we have seen, consumption profile follow a logarithmic rule.
This might be a problem when only two points are given (min 0%, max 100% for instance) since we don't want a linear distribution. We could use existing consumption profile in the regression process.
Input value
Format
We should have this type of input format :
Data example
Example for AWS server CPU from TEADS Link :
Example from specpower agregated by Cloud carbon footprint : Link
Output value
A function described by its coefficients
The text was updated successfully, but these errors were encountered: