---
title: Optimize
description: Optimize improves migrated workloads after cutover through rightsizing, performance tuning, reliability hardening, and FinOps-driven cost controls.
sidebar:
  label: Overview
  order: 0
source_url: "https://framework.stackit.cloud/migration/migrate/optimize/overview/"
source_file: "docs/migration/migrate/optimize/overview.mdx"
---

## Understanding the Optimize module

Optimize starts when workloads run on STACKIT and real operating data is available.
The module converts post-cutover observations into measurable improvements for performance,
stability, and cost efficiency.

Optimize is not a one-time task. It is an iterative cycle that can overlap with early stabilization and post-cutover care.

### Why optimization happens after migration

Many right-sizing and tuning decisions are only reliable under real load patterns.
After cutover, teams can use production telemetry to separate assumptions from actual behavior.

### Optimization loop

<Steps>

1. Collect runtime evidence: utilization, latency, error rates, throughput, and cost drivers.
2. Identify bottlenecks and waste patterns at workload, platform, and data layers.
3. Prioritize actions by business impact, risk reduction, and FinOps effect.
4. Implement tuning changes in controlled increments.
5. Validate outcomes against SLO, reliability, and cost targets.
6. Feed lessons learned into future migration waves and operating standards.

</Steps>

### Typical optimization focus areas

- **Rightsizing**: Align compute, storage, and network capacity with actual demand profiles.
- **Performance tuning**: Improve latency and throughput through configuration, scaling, and architecture adjustments.
- **Reliability hardening**: Reduce incident frequency through better resilience, observability, and failure handling.
- **FinOps controls**: Improve cost transparency, remove waste, and optimize run-rate efficiency.

## From theory to implementation

Optimization decisions should be based on runtime evidence, not assumptions.
For practical implementation, combine workload telemetry, alerting, and controlled infrastructure changes.

- **Managed observability baseline**: Use <LinkChip href="https://docs.stackit.cloud/products/logging-and-monitoring/observability/">STACKIT Observability</LinkChip> to collect metrics, logs, and traces with Grafana, Prometheus, Thanos, Loki, and Tempo.
- **Detection logic**: Define explicit thresholds and observation windows for low utilization and overload conditions.
- **Run path**: Apply rightsizing through IaC changes (for example VM flavor changes) with rollback checkpoints.
- **Validation loop**: Re-measure SLO, error rates, and run-cost after each tuning increment.

## Concrete example asset

<ScfAssetLoader
  frameworkSlug="migration"
  filterByTag="optimize"
  hideFilterControls={true}
  hideSearch={true}
/>

## Replatform optimization dimensions

For Replatform workloads on Kubernetes, optimization spans multiple layers and should be coordinated as one control loop.

- **Pod scaling**: Use HPA to adapt replica count to workload pressure with explicit min/max limits.
- **Node pool scaling**: Keep sufficient cluster headroom and tune machine type (flavor) for CPU/memory density requirements.
- **Ingress scaling**: Re-evaluate load balancer service plan when ingress throughput or connection behavior becomes a bottleneck.
- **Storage rightsizing**: Select storage classes based on performance requirements for persistent workloads.
- **Validation discipline**: Re-check latency, error rate, and cost after every incremental tuning change.

## Inputs and outputs

<CardGrid>
  <Card title="Primary inputs">
    Cutover reports, incident trends, SLO measurements, telemetry baselines, and cost reports.
  </Card>
  <Card title="Optimization outputs">
    Prioritized improvement backlog, validated tuning changes, and updated runbook standards.
  </Card>
  <Card title="Governance outcome">
    Clear trade-off decisions between performance, resilience, and cost with documented ownership.
  </Card>
</CardGrid>

## Boundary to other modules

- Optimize follows technical migration delivery in [Migrate](/migration/migrate/migrate/overview/).
- Optimize can run in parallel with early post-cutover care activities, while ownership for this care model is covered in the Run phase.
- Deeper architectural redesign remains in [Refactor](/migration/migrate/refactor/overview/).
