-
Notifications
You must be signed in to change notification settings - Fork 10
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
AAW Infra: scale down gerenal nodepool #1965
Comments
Resource saturation per node on dev and prod clusters: metrics sourced from azure dashboard: node: vmss000000 node: vmss000001 node: vmss000005 node: vmss000007 node: vmss00004r node: vmss00004s node: vmss00004t cluster: aaw-prod-cc-00-aks metrics sourced from grafana dashboard: Kubernetes/Compute Resources/Node (Pods) node: vmss00001c node: vmss00001n node: vmss00001r node: vmss00001v node: vmss00001z |
Inspected the daemonsets getting deployed on dev and prod clusters. The same daemonsets are deployed to all general nodes on dev and all general nodes on prod clusters. These are the daemonsets:
|
For my analysis I would like to get this metric: For a given node, the sum of cpu (mem) resource requests over all pods hosted on that node at a given time. Currently browsing existing Grafana dashboards for something like it. I will have a look at prometheus api to see how involved it would be to construct a new one. |
Summarizing which existing dashboards hosted on grafana are applicable to node utilization analysis:
These ones are not particularly useful for studying nodel utilization for issues listed. |
Here's the resource request totals for pods on specified nodes (on the dev cluster) as percentage of node resource capacity:
|
@Jose-Matsuda can you please follow up with @jacek-dudek on access to Grafana (dev & prod) |
Obtained editor permissions on Grafana. Created new dashboard named "Node resource utilization - comparative view". |
Summary of resource utilization on general nodepool based on statistics obtained from existing dashboards: Conclusion: I think we can safely scale down our virtual machine models from ones with 32cores and 126GiB of memory to models with 8cores and 32GiB of memory. |
We are already on the machines with 8cores and 32GiB of memory as defined here (i also double checked on the portal itself and yes its the Do you think we can move to a Standard_D4ds_v5 or even Standard_D2ds_v5? I'm thinking for aaw dev we might be able to squeeze on the 2CPU 8GB machines, but possibly only after re-sizing the workloads. I think Zone dev we are already on 4CPU machines so getting on that would be easy |
@jacek-dudek what do you think about this comment? Since #1997 has been completed we can make the terraform change for AAW-dev and observe, similar to what's in #2002 except we see how many machines are spun up since at the end of the day that's what costs the $'s |
I cannot seem to access that repo at the moment Jose. I will go through the MS documentation for now. The way I was getting the cpu and memory stats for the nodes was by looking at the Kubernetes/Compute Resources/Node (Pods) dashboard in Grafana, selecting a single node, and selecting the max capacity dataset. And that was displaying a line going across roughly at 32 cores. Similarly for memory, it looked like approximately 126GiB. Any idea why it would display that? |
@jacek-dudek good question, i took a look in the grafana queries it seems as if that sum doubles it; Running just the base query of |
Linking the pull request I made in gitlab: https://gitlab.k8s.cloud.statcan.ca/cloudnative/aaw/terraform-advanced-analytics-workspaces-infrastructure/-/merge_requests/324 |
@jacek-dudek include the details on how you arrived to the conclusion that Standard_E2ps_v6 is better than the Standard_E2ds_v5 machine, including the tool used to perform this analysis. |
Sounds like this might be georedundancy, but this should be the case for dev clusters. |
Elaborating on how I chose the VM model: I examined the resource utilization summary in azure portal for the general nodepool. I noticed that utilization is skewed toward memory, with utilization of around 65% while CPUs are utilized at around 10%. I concluded that regardless of the VM size we ultimately choose, we would better served by a memory-optimized model, as our workloads on this nodepool seem to be more memory intensive. I used this vm selection tool to narrow down the VM models: The existing machines that we're using are model Standard_D8s_v3, which has 8 cores and 32 GiB of memory. In that configuration, with that ratio of 1:4 of cores to memory, we're observing the resource utilization mentioned above. The machines that are being suggested further up in the issue comments, Standard_D4ds_v5 or Standard_D2ds_v5, offer the same ratios of 1:4 of cores to memory. Whereas the memory optimized ones, including Standard_E2ds_v5 and Standard_E4ds_v5 offer a ratio of 1:8 of cores to memory. I would expect that using the memory optimized ones would balance out the utilization of cores to memory while causing no other issues. All other features in the series are the same, see below: |
In conclusion, if we chose the Standard_D4ds_v5 model then we would have a budget of 4 cores and 16 GiB of memory. That would leave us under-budgeted in terms of memory, and we would likely have to scale up another node or more. Whereas if we chose the Standard_E4ds_v5 model then we would have a budget of 4 cores and 32 GiB of memory. So the memory utilization would hopefully remain the same (I know that memory can be used for paging when cpu is overutilized, but we still wouldn't be close to overutilizing the cpus.), while the cpu utilization would be twice as good as presently, and we wouldn't be scaling up additional nodes. |
@jacek-dudek |
Is your feature request related to a problem? Please link issue ticket
Let's look at scaling down the General Nodepool to saturate the nodes better.
Currently, with some observation using grafana/lens, I can see that we are looking at maximum utilization of ~30% for CPU/mem in terms of node resource usage.
Another issue is that most of the daemonsets that don't necessarily need to be on the general nodes do have a pod on them. This is costly at no added value.
Describe the solution you'd like
--- Maybe for next sprint ---
Describe alternatives you've considered
NA
Additional context
The text was updated successfully, but these errors were encountered: