> For the complete documentation index, see [llms.txt](https://docs.perfectscale.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.perfectscale.io/visibility-and-optimization/bin-packing-optimization.md).

# Bin packing optimization

Learn how to optimize Kubernetes bin packing to improve resource utilization, reduce cloud costs, and maintain application health and performance

**Bin Packing** view provides you a clear visibility into the workloads preventing nodes from being removed from a cluster.&#x20;

This view helps you evaluate resource utilization, identify idle node capacity, quickly spot node consolidation blockers, such as pods that cannot be evicted, and access detailed pod and node data for further investigation.

<figure><img src="https://1573387604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FABMqnYtsOO44JmQTVSnn%2Fuploads%2FD55BIHjvTgWNnMde2LkE%2FGroup%201000002913.png?alt=media&amp;token=f3d60a49-37e2-48d6-a63a-9a9607015698" alt=""><figcaption><p>Bin packing view</p></figcaption></figure>

By combining a cluster-wide view with node-level details, it helps you improve bin packing, maximize the efficiency of your cluster autoscaler (such as Karpenter or Cluster Autoscaler), and ultimately reduce Kubernetes cloud costs.

{% hint style="success" %}
Let PerfectScale remove blocked nodes for you. [Bin packing automation](https://docs.perfectscale.io/enable-automation/bin-packing-automation.md) moves the pods off underutilized nodes that your autoscaler cannot remove and hands the empty node back to the autoscaler.
{% endhint %}

## Understanding bin packing view

### Snapshot selector

Use the snapshot picker in the top-right corner to select a specific one

<figure><img src="https://1573387604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FABMqnYtsOO44JmQTVSnn%2Fuploads%2Fwavz0JcFeZYOcgnFFSc9%2Fimage.png?alt=media&amp;token=91448491-385e-41fb-9525-b8bb631d728b" alt=""><figcaption><p>Snapshot selector</p></figcaption></figure>

### Top panel summary

The **top panel** summarizes the environment, showing the number of visible nodes and pods, as well as unevictable pods. This helps you quickly identify blockers to node consolidation and scale-down.

<figure><img src="https://1573387604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FABMqnYtsOO44JmQTVSnn%2Fuploads%2FDbThYr2bjvthQxNtnibB%2FFrame%201707479264.png?alt=media&amp;token=f11b52ae-87d1-4fea-ad03-5d23e5495fa1" alt=""><figcaption><p>Unevictable Pods - top panel</p></figcaption></figure>

{% hint style="info" %}
Click **See Recommendations** in the Unevictable Pods widget to access actionable insights into why pods cannot be evicted, the associated blocked cost, and how to resolve the issue. Learn more about the recommendations [here](#unevictable-pods-recommendations).
{% endhint %}

### Instance charts

Use the **Instances charts** for deeper analysis. This view shows which pods are running on each instance, their share of resources, and whether any of them are unevictable, helping you quickly understand if pods may impact scale-down.

<figure><img src="https://1573387604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FABMqnYtsOO44JmQTVSnn%2Fuploads%2FxySZ0hOBsLR7FIOS0E1g%2FFrame%201707479265.png?alt=media&amp;token=eb386c7a-893b-493b-aa5b-92ce956ab5d0" alt=""><figcaption><p>Instance charts</p></figcaption></figure>

#### Customize view

Switch between memory and CPU views to evaluate resource utilization from different perspectives. Use filters to narrow down the displayed data and sorting to prioritize nodes based on relevant metrics, making it easier to identify underutilized resources and bin-packing opportunities.

<figure><img src="https://1573387604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FABMqnYtsOO44JmQTVSnn%2Fuploads%2F0B7BF0gWzE3B2KsJ9zPL%2Fview%20controls.gif?alt=media&amp;token=b86fc7b7-977d-4f43-8a8a-690014727e61" alt=""><figcaption><p>Display controls</p></figcaption></figure>

Use the **Filter** control to narrow down the view by node-level or pod-level criteria. Filters allow you to focus on specific subsets of your cluster, such as nodes with taints or pods in a particular namespace, etc.

Use the **Sort** control to reorder nodes based on different criteria, such as idle, resource utilization or unevictable pod count.

#### Node cards

<figure><img src="https://1573387604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FABMqnYtsOO44JmQTVSnn%2Fuploads%2FAL9tvbIDG4L5dRCCWEwp%2Fimage.png?alt=media&amp;token=261a50a7-03d1-4647-b334-3f6aca85c7e8" alt="" width="563"><figcaption><p>Node cards</p></figcaption></figure>

Each node is represented as a card displaying the following information:

* **Resource bars:** Horizontal bars showing requested vs. total available capacity, such as CPU, RAM, and GPU.
* **Pod treemap:** Pods inside each node are displayed as a treemap. Unevictable pods are highlighted with a orange border for quick identification.
* **Bottom labels:** Each card shows the node's taints and a count of unevictable pods.

{% hint style="info" %}
By hovering over a pod, you can see its details in the tooltip. To dive deeper and get more extensive view, click on a specific pod or node, so you can get a full details in the sidebar.
{% endhint %}

By clicking on any node or pod, you can open the sidebar detail view, which includes:

* **Item info:** name, namespace, resource requests and limits, and other key metadata.
* **Resources utilized:** a breakdown of actual resource usage (allocated vs. allocatable).
* **Conditions**: indicates if the node passed the checks, such as memory pressure, disk pressure, etc.
* **Annotations:** all Kubernetes annotations associated with the item.
* and more.

<figure><img src="https://1573387604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FABMqnYtsOO44JmQTVSnn%2Fuploads%2FEptMOJn0CCtTeA6S1dUk%2Fdetails.gif?alt=media&amp;token=c028bdb7-4bcf-488c-9e5c-abbbf90426a5" alt=""><figcaption><p>Pod details</p></figcaption></figure>

## ⚡️ Unevictable pods recommendations

When PerfectScale detects unevictable pods, it provides precise, data-driven YAML diff recommendations that compare the current configuration with the recommended changes, helping you troubleshoot bin-packing issues and resolve them in just a few clicks.

To access Unevictable Pods recommendations, select the relevant click **See Recommendations** or the **Unevictable Pods** widget.

<figure><img src="https://1573387604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FABMqnYtsOO44JmQTVSnn%2Fuploads%2FGAYRoS3S2d6XepEG7j6G%2Frecommendations.gif?alt=media&amp;token=2befb47d-4a30-468c-86c9-5b9b8751183e" alt=""><figcaption><p>Unevictable pods recommendations</p></figcaption></figure>

{% hint style="info" %}
Recommendations are automatically prioritized and ranked by cost impact, helping you focus on the highest-value optimization opportunities first and maximize savings.
{% endhint %}

Click **See Recommendation** next to a recommendation to open its details. You'll find a clear explanation of the recommended change, along with the corresponding YAML configuration that you can copy with a single click and apply directly to your manifest.

{% hint style="success" %}
To help you optimize with confidence, PerfectScale assigns a **confidence level** and **risk level** to every recommendation. These indicators help you assess the expected impact of each change, enabling safe optimization while maintaining application reliability and performance.
{% endhint %}

Some findings may be intentional and do not require any action. If that's the case, click **Mute for Workload**. PerfectScale will automatically hide the same finding for all unevictable pods in that workload, so it won't appear in future scans. You can still view muted findings in the **Muted** tab and unmute them at any time.

<figure><img src="https://1573387604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FABMqnYtsOO44JmQTVSnn%2Fuploads%2FKBlf0DxBslK9HraUzxRe%2Fimage.png?alt=media&amp;token=c8d3702f-d279-4c80-a3f7-0ed298acfd87" alt=""><figcaption><p>Mute the recommendation</p></figcaption></figure>

{% hint style="info" %}
The **Active** and **Muted** tabs give you visibility into all findings, making it easy to see which ones still in a backlog and require attention, and which are muted.
{% endhint %}
