<p>We are Using AKS cluster 1-19.11 and our userpools where application podsrunning are under utlization (only 30% of consumption). So we were thinking of cost optimization by reducing the node counts of nodepools.</p>
<p>So would like to get more details considered while planning for node count decrease.</p>
<ul>
<li><p>Assume that the node utlisation can be estimated and calculated using the pods requests value and no need to consider the limit range as auto scaller is enabled</p>
</li>
<li><p>Also is it possible to modify the autoscaler profile of cluster property &quot;scaleDownUtilizationThreshold&quot;: &quot;0.5&quot;, to more %.. and whether its recommeneded to increase to 70%. ?</p>
</li>
</ul>

Vowneee
<p>The assumption,</p>
<blockquote>
<p>node utlisation can be estimated and calculated using the pods requests value and no need to consider the limit range as auto scaler is enabled</p>
</blockquote>
<p>will hold good as long as you don't care about what process/container gets evicted in case of node resource starvation (if controlled by a deployment or a replica set or stateful set the workloads will be resurrected in a new node that is scaled out by the auto scaler).</p>
<p>However, in most cases you would have some kind of priority for your workloads and you would want to set thresholds (limits) accordingly so that you don't have to deal with the kernel evicting important processes (maybe not the one that caused starvation but was using highest resources right at the time when the evaluation happened).</p>
<blockquote>
<p>Also is it possible to modify the autoscaler profile of cluster property &quot;scaleDownUtilizationThreshold&quot;: &quot;0.5&quot;, to more %.. and whether its recommeneded to increase to 70%. ?</p>
</blockquote>
<p>Yes, the value of Cluster Autoscaler Profile <code>scale-down-utilization-threshold</code> can be updated using the command:</p>
<pre><code>az aks update \
  --resource-group myResourceGroup \
  --name myAKSCluster \
  --cluster-autoscaler-profile scale-down-utilization-threshold=&lt;percentage value&gt;
</code></pre>
<p>[<a href="https://learn.microsoft.com/en-us/azure/aks/cluster-autoscaler#set-the-cluster-autoscaler-profile-on-an-existing-aks-cluster" rel="nofollow noreferrer">Reference</a>]</p>
<p>AKS uses node resources to help the node function as part of your cluster. This usage can create a discrepancy between your node's total resources and the <strong>allocatable</strong> resources in AKS. [<a href="https://learn.microsoft.com/en-us/azure/aks/concepts-clusters-workloads" rel="nofollow noreferrer">Reference</a>]</p>
<p>Now <code>scale-down-utilization-threshold</code> is the node utilization level, defined as sum of requested resources divided by <strong>allocatable</strong> capacity, below which a node can be considered for scale down.</p>
<p>So, ultimately there can be no best practice shared on this as it is the user's use case, architectural design and requirements that dictate what should be the <code>scale-down-utilization-threshold</code> for the cluster auto scaler.</p>
