Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
21d726f
Update ocean-cluster-right-sizing-tab.md
rickshar Jun 18, 2025
260997f
Update ocean-cluster-right-sizing-recom-tab.md
rickshar Jun 18, 2025
52fa50f
Update ocean-cluster-right-sizing-recom-tab.md
rickshar Jun 18, 2025
026910a
Update ocean-cluster-right-sizing-tab.md
rickshar Jun 18, 2025
472f747
Update ocean-cluster-right-sizing-tab.md
rickshar Jun 18, 2025
97a66ae
Update ocean-cluster-right-sizing-tab.md
rickshar Jun 18, 2025
74dfba3
Update ocean-cluster-right-sizing-tab.md
rickshar Jun 18, 2025
bdf8f47
Update ocean-cluster-right-sizing-recom-tab.md
rickshar Jun 18, 2025
e6cb7a8
Update ocean-cluster-right-sizing-tab.md
rickshar Jun 19, 2025
23ef39a
Create update-vertical-pod-autoscaler-project.md
rickshar Jun 19, 2025
1a488b3
Update update-vertical-pod-autoscaler-project.md
rickshar Jun 19, 2025
7d9f560
Update update-vertical-pod-autoscaler-project.md
rickshar Jun 19, 2025
209b48a
Update ocean-cluster-right-sizing-tab.md
rickshar Jun 19, 2025
bab5cda
Update ocean-cluster-right-sizing-tab.md
rickshar Jun 19, 2025
97fb97e
Update ocean-cluster-right-sizing-tab.md
rickshar Jun 19, 2025
d00e824
Update update-vertical-pod-autoscaler-project.md
rickshar Jun 19, 2025
72544dd
Update update-vertical-pod-autoscaler-project.md
rickshar Jun 19, 2025
69a9340
Update ocean-cluster-right-sizing-recom-tab.md
rickshar Jun 19, 2025
a218257
Update ocean-cluster-right-sizing-tab.md
rickshar Jun 19, 2025
2ceafc1
Update ocean-cluster-right-sizing-tab.md
rickshar Jun 19, 2025
dae89ea
Update ocean-cluster-right-sizing-recom-tab.md
rickshar Jun 19, 2025
d7f1a6c
Update update-vertical-pod-autoscaler-project.md
rickshar Jun 19, 2025
00dc458
Update ocean-cluster-right-sizing-tab.md
rickshar Jun 23, 2025
f0a9119
Add files via upload
rickshar Jun 23, 2025
2a3c9f5
Update ocean-cluster-right-sizing-recom-tab.md
rickshar Jun 23, 2025
571cfa6
Update ocean-cluster-right-sizing-recom-tab.md
rickshar Jun 23, 2025
816a4cf
Update ocean-cluster-right-sizing-recom-tab.md
rickshar Jun 23, 2025
77f875d
Update ocean-cluster-right-sizing-recom-tab.md
rickshar Jun 23, 2025
e5ce1c9
Update ocean-cluster-right-sizing-tab.md
rickshar Jun 23, 2025
c438a61
Update ocean-cluster-right-sizing-tab.md
rickshar Jun 23, 2025
0d9b559
Update ocean-cluster-right-sizing-recom-tab.md
rickshar Jun 29, 2025
99a03d6
Add files via upload
rickshar Jun 29, 2025
b8a9847
Update ocean-cluster-right-sizing-recom-tab.md
rickshar Jun 29, 2025
747ab21
Update ocean-cluster-right-sizing-recom-tab.md
rickshar Jun 29, 2025
0aafdba
Update ocean-cluster-right-sizing-tab.md
rickshar Jun 29, 2025
09e0684
Add files via upload
rickshar Jun 29, 2025
d5c7ae5
Update ocean-cluster-right-sizing-tab.md
rickshar Jun 29, 2025
ab94e4a
Update ocean-cluster-right-sizing-recom-tab.md
rickshar Jul 14, 2025
b2f1dbd
Update ocean-cluster-right-sizing-savings-tab.md
rickshar Jul 14, 2025
94fa2ad
Update ocean-cluster-right-sizing-tab.md
rickshar Jul 14, 2025
00ca662
Update ocean-cluster-right-sizing-tab.md
rickshar Jul 22, 2025
b8c589e
Update update-vertical-pod-autoscaler-project.md
rickshar Jul 22, 2025
568681e
Add files via upload
rickshar Jul 28, 2025
8f019b3
Update ocean-cluster-right-sizing-recom-tab.md
rickshar Jul 28, 2025
853d5e2
Update ocean-cluster-right-sizing-recom-tab.md
rickshar Aug 3, 2025
fb76d47
Update ocean-cluster-right-sizing-savings-tab.md
rickshar Aug 3, 2025
acf3b3f
Update troubleshoot-right-sizing.md
rickshar Aug 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
107 changes: 55 additions & 52 deletions src/docs/ocean/features/ocean-cluster-right-sizing-recom-tab.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Automatic Right-Sizing Recommendations and Rules

Cloud service provider relevance: <font color="#FC01CC">EKS</font> and <font color="#FC01CC">AKS</font>
Cloud service provider relevance: <font color="#FC01CC">EKS</font>, <font color="#FC01CC">AKS, and GKE</font>

This topic shows you how to view right-sizing recommendations for workloads and containers and work with right-sizing rules.

Expand All @@ -21,7 +21,8 @@ Your workload optimization activities impact the status of the workloads in the

## Workloads Optimization List

<img width="1000" src="https://github.com/user-attachments/assets/a6070749-5c8f-4871-b4ff-2c3faccc5755" />
<img width="1000" alt="right-sizing-example-table-ex" src="https://github.com/user-attachments/assets/92ac8778-4b63-42bf-b9b5-76213fd8ec49" />


This list displays your right-sizing recommendations per workload and lets you drill down per container.
* [Right Sizing rules](ocean/features/ocean-cluster-right-sizing-recom-tab?id=automation-rules-list) that are attached to specific workloads.
Expand All @@ -33,9 +34,9 @@ This list displays your right-sizing recommendations per workload and lets you d
* Gray (Rollback): Ocean rolled back to the original deployment request and suspended the workload's attachment to the rule.
* Brown (Not Attached): The Workload is not optimized.
* Workload type and names.
* vCPU and memory right sizing recommendations per deployment. Recommended increases are shown with a green up arrow, and recommended decreases are shown with a red Down arrow.
* HPA: If the workload is configured with HPA, **ON** is displayed under HPA. Hover over the entry for information about the specific HPA trigger (CPU/Memory/other).
* Potential monthly maximums savings if you adopt the recommendations.
* vCPU and memory right sizing recommendations per deployment. Recommended increases are shown with a green up arrow, and recommended decreases are shown with a red down arrow.
* HPA: If the workload is configured with HPA, **ON** appears under the HPA column. Hover over the entry for information about the specific HPA trigger (CPU/Memory/other).
* Potential maximum monthly savings if you adopt the recommendations.

> **Notes**:
> - Hover over the Limited and Not optimized statuses to view more details in a tooltip.
Expand All @@ -53,8 +54,8 @@ To view a list of your potential savings and recommendations per container:

* Click on the down arrow to the left of a workload to drill down to the containers. For each container, you can then view the following:

* vCPU Request: showing current and average utilization and a recommended increase or decrease for this resource (in vCPU units). If no changes are required, a Keep icon is displayed.
* Memory Request: This shows current and Average utilization and a recommended increase or decrease for this resource (in MiB units). If no changes are required, a Keep icon is displayed.
* vCPU Request: showing current and average utilization, and a recommended increase or decrease for this resource (in vCPU units). If no changes are required, a Keep icon is displayed.
* Memory Request: This shows current and Average utilization, and a recommended increase or decrease for this resource (in MiB units). If no changes are required, a Keep icon is displayed.
* Right-Sizing Recommendations: Show the recommended changes in vCPU and memory. Click on the Copy icon to save these changes for later.

## Automation Rules List
Expand All @@ -70,39 +71,49 @@ You can create right-sizing rules to trigger immediately after a specific set of

### Create or Edit a Right-Sizing Rule

To create/edit a right-sizing rule:
To create or edit a right-sizing rule:

1. Click the **Advanced Optimization** tab if not already displayed.
2. To create a new rule, click **+ Add new rule** above the Automation Rules list (or to edit an existing rule, click the pencil icon in the rule).
1. Click the **Advanced Optimization** tab, if it is not already displayed.
2. To create a new rule, click **+ Add new rule** above the rules list (or edit an existing rule).

<img height="700" src="https://github.com/user-attachments/assets/0dcc58d8-86c3-4496-bde8-b1cce5dc2109" />
<img width="500" src="https://github.com/user-attachments/assets/44cf0e73-8bd0-4dbe-b383-a28abf6c31cc" />

3. In the Configure Automation Rule dialog box, enter/edit the unique rule name.
4. Select when to apply the recommendation by selecting one of the following options:
3. In the Configure automation rule dialog box, enter/edit a unique rule name.
4. Select when to apply the recommendation:

* **Once available**: The recommendation is applied immediately after it becomes available.
* **Specific time**: You select when to apply the recommendation after it becomes available.
* **Once available**: Apply the recommendation immediately when it becomes available.
* **Specific time**: Apply the recommendation at a specific time after it becomes available.

![rule-when-to-apply-3](https://github.com/user-attachments/assets/5cb76163-9f33-477e-95d6-b99b36f0f200)
<br>
<img width="500" src="https://github.com/user-attachments/assets/31f94101-ee02-4cc4-b699-a81eb2130400" />

5. Turn on **Exclude preliminary recommendation** if you want to suppress recommendations as long as the workload has preliminary status (4 days).
6. Select one of the **Restart replicas** options:
* All manifests.
* Manifests with more than 1 replica only.
* No restart.
7. Click the **Set the resources percentage change** down arrow to apply the recommendation, and set the CPU and Memory percentage thresholds. This is the minimum percentage change from the current request for applying a recommendation. If the right-sizing recommendation exceeds the percentage threshold for either resource (CPU or Memory), it will be applied to both resources, and the resulting status will be **fully optimized**. We do this because the original purpose of the threshold is to prevent unnecessary pod deletion. However, if we need to delete a pod and relaunch a new one for one resource, we do the same for the other.
8. Click the **Set recommendation ranges for resources** down arrow and enter the upper and lower boundary values for CPU (millicpu) and Memory (MiB) requests to apply a recommendation. By default, the minimum values are 10 millicpu for CPU and 32 MiB for memory; no lower values will be accepted.
6. Select one of the **Pod modification methods**:
* Update workloads live.
* Restart all attached workloads.
* Restart all attached workloads with more than 1 replica only.
* Update workloads on recreation without triggering a restart.

>**Note**: if you have Kubernetes 1.33 or above, Ocean can (in most cases) automatically apply the recommendations without having to restart pods. For feature limitations, see the [Kubernetes documentation](https://kubernetes.io/docs/tasks/configure-pod-container/resize-container-resources/#limitations).

7. Set the recommendation baseline (right-sizing percentile) for the workload to calculate the vCPU and memory recommendations.
The lower the percentile, the stronger the recommendations. By default, both vCPU and memory use the 85th percentile.

>**Important:** Changing the percentiles will impact any recommendations that were already applied (this may take a few minutes to update) and will also override the values set at cluster level for this workload.

8. Click **Set the resources percentage change to apply the recommendation** (CPU and memory percentage thresholds). This is the minimum percentage change from the current request for applying a recommendation. If the right-sizing recommendation exceeds the percentage threshold for either resource (CPU or memory), it will be applied to both resources, and the resulting status will be **fully optimized**. We do this because the original purpose of the threshold is to prevent unnecessary pod deletion. However, if we need to delete a pod and relaunch a new one for one resource, we do the same for the other.
9. Click **Set recommendation ranges for resources**, and enter the upper and lower boundary values for CPU (millicpu) and memory (MiB) requests to apply a recommendation. By default, the minimum values are 10 millicpu for CPU and 32 MiB for memory; no lower values will be accepted.
* If a recommendation is above the set boundaries, automatic right-sizing will apply the recommendation using the maximum value configured in the rule.
* If a recommendation is below the set boundaries, automatic right-sizing will apply the recommendation using the minimum value configured in the rule.
9. Click the **Set overhead for resources** down arrow and set the CPU and memory percentage overheads. An overhead specifies the percentage of extra resources to add to the new request recommendation.
10. Ocean supports automatic right-sizing for HPA-associated workloads. To enable, click **Apply HPA on associated workload**.
11. Click **Set overhead for resources**, and set the CPU and memory percentage overhead. An overhead specifies the percentage of extra resources to add to the new request recommendation.
12. Ocean supports automatic right-sizing for workloads associated with HPA. Click **Apply HPA on associated workload** to enable.

11. Turn on **Auto-attach** if you want to automatically attach rules to workloads based on selected criteria.
* In the Auto-attach area, select required namespaces / labels.
13. Turn on **Auto-attach** if you want to automatically attach rules to workloads based on selected criteria.
* In the Auto-attach area, select required namespaces and / or labels.

<img width="500" src="https://github.com/user-attachments/assets/dae038b7-6dda-4a85-8e2f-bea04c12f517" />
<img width="500" src="https://github.com/user-attachments/assets/95b7724c-4be7-4da4-86df-45b9b3d5d466" />

12. After you save the rule, it appears in the area under the [Workloads Optimization list](https://docs.spot.io/ocean/features/ocean-cluster-right-sizing-recom-tab?id=workloads-optimization-list).
12. A saved rule appears in the area under the [Workloads Optimization list](https://docs.spot.io/ocean/features/ocean-cluster-right-sizing-recom-tab?id=workloads-optimization-list).

> **Notes**:
> - Default values for Overhead and Automation Threshold are **10%** and **5%** respectively.
Expand All @@ -124,9 +135,9 @@ To manually attach a rule:
1. Select one or more workloads in the Workloads Optimization list.
2. From the Actions drop-down menu above the table, click **Attach Rule**.

![attach-rule-to-workload](https://github.com/user-attachments/assets/be315afa-0ef8-4d30-b1f3-422e8caf8633)
![attach-rule-to-workload](https://github.com/user-attachments/assets/be315afa-0ef8-4d30-b1f3-422e8caf8633)

3. You can either attach an existing or new rule you create from scratch (a new rule will be attached to the workload(s) you selected earlier):
3. You can either attach an existing rule or create a new rule from scratch (a new rule will be attached to the workload(s) you selected earlier):

* Click the **Select from existing rule** drop-down menu and then select a rule.
* Click **Create new rule from scratch** (see [Create or Edit a Right-Sizing Rule](ocean/features/ocean-cluster-right-sizing-recom-tab?id=create-or-edit-a-right-sizing-rule))
Expand All @@ -144,10 +155,10 @@ To detach a rule from one or more workloads:

### Delete a Right-Sizing Rule

To delete a right sizing rule:
To delete a right-sizing rule:

1. To the right of the row for the rule in the list, click the wastebasket icon.
2. When the confirmation message appears, Click **Delete**, or **Cancel** (if you are unsure).
2. When the confirmation message appears, click **Delete**, or **Cancel** (if you are unsure).

>**Important**: You cannot restore a deleted right-sizing rule. In addition, a rule may be deleted only if it is no longer attached to a workload.

Expand All @@ -159,9 +170,9 @@ To acknowledge a workload rollback:

1. Click **Acknowledge Rollback** to view all the workloads with the rollback status.

![right-sozomg-rollback-dialog](https://github.com/user-attachments/assets/4bb206f5-73e3-4b26-b7fb-19e5e519505f)
<img width="700" src="https://github.com/user-attachments/assets/310675c3-29eb-4259-b886-d89a2683292a" />

* The rollback drill-down list contains the following information:
* The rollback list includes the following information:
* Workload Name.
* Namespace.
* CPU Update in vCPUs (before and after rollback).
Expand All @@ -173,37 +184,29 @@ To acknowledge a workload rollback:

The workloads are displayed in the [Workloads Optimization List](https://docs.spot.io/ocean/features/ocean-cluster-right-sizing-recom-tab?id=workloads-optimization-list) without any attached rules. Before attaching a rule to a rolled-back workload, first fix the issue.

### Set the vCPU/Memory Percentile

You can select the right-sizing percentile settings to calculate the vCPU and memory recommendations.
The lower the percentile, the stronger the recommendations.

By default:

* vCPU: Right-sizing uses the 85th percentile.
* Memory: Right-sizing uses the maximum value.

>**Important:** Changing the percentile setting will impact the recommendations that were already applied (this may take a few minutes to update).
### Set the vCPU/Memory Percentiles at Cluster Level

To change settings:
These are the global percentile settings at the cluster level and apply to all workloads in the cluster.

1. Click **Settings** above the [workloads optimization list](https://docs.spot.io/ocean/features/ocean-cluster-right-sizing-recom-tab?id=workloads-optimization-list).
Any percentile change you make for a specific workload in a right-sizing rule overrides the setting at cluster level.

<img width="500" src="https://github.com/user-attachments/assets/5bcddc81-c527-4f87-a897-369e911bedcc" />
To change the settings:

2. Click the arrow on the right for **vCPU** or **Memory** as required (vCPU shown in the example).
1. Click **Cluster Settings** above the [workloads optimization list](https://docs.spot.io/ocean/features/ocean-cluster-right-sizing-recom-tab?id=workloads-optimization-list).

2. Click **vCPU** or **Memory** as required (vCPU is shown in the example).

<img width="500" src="https://github.com/user-attachments/assets/59b2e755-04d8-4967-9b39-9fc0904e5231" />
<img width="500" src="https://github.com/user-attachments/assets/59b2e755-04d8-4967-9b39-9fc0904e5231" />

3. Change the current value(s) and save.

## Best Practices

These are the Right-Sizing Best Practices:
These are the right-sizing best practices:

* Workload limits should not have the same values as requests.
* If you set overheads for resources, start with a relatively high overhead (20%) and decrease it with time.
* If you set boundaries (recommendation ranges for resources), avoid applying the specific rule to all workloads. All services have different purposes.
* If you set boundaries (recommendation ranges for resources), avoid applying the same rule to all workloads. All services have different purposes.

## Related Topics

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Automatic Right-Sizing Actual Savings

Cloud service provider relevance: <font color="#FC01CC">EKS</font> and <font color="#FC01CC">AKS</font>
Cloud service provider relevance: <font color="#FC01CC">EKS</font>, <font color="#FC01CC">AKS, and GKE</font>

This topic shows you how to view your (actual) right-sizing savings from applying down-sizing recommendations to your workloads.

Expand Down
Loading