Optimising Cost and Performance in Cloud HPC Job Scheduling


Published 06/10/2026 By nAG

Moving HPC workloads to the cloud gives organisations flexible access to the latest hardware, but it also introduces a new challenge: knowing whether each job is running on the right resources at the right price. With new instance types arriving regularly, prices that shift with demand, and limited visibility of spend while jobs are running, the most cost-effective choice is rarely obvious. In this blog, we look at why balancing cost and performance in cloud HPC is so difficult, and share an approach we are researching that lets users schedule jobs around the outcomes they need, such as budget and deadline, rather than low-level hardware settings.

The challenge

One of the challenges our clients face moving High Performance Computing (HPC) workloads to cloud can be understanding the dozens of different compute options, with variations in architecture, core count, memory, storage, networking and more! Trading price and performance parameters to achieve the objective time and/or cost to results is where our experience can often be the difference in the business case for migrating to cloud.

In practice, many new cloud users often select instances from experience of their on-premises system or experiment with only a small number of different instances without knowing if those settings are cost-effective. Established cloud users will often stick with what works, without assessing the cost/performance trade that newer instances can offer.

As workloads scale across tens or hundreds of instances, small inefficiencies accumulate into substantial long-term costs. Which configuration delivers the best trade-off between performance and cost for a given workload is difficult to know.

Why optimization is difficult

The difficulty is not only that a good configuration is hard to find, but that the lowest-cost configuration can change. There are several factors to consider in a cloud environment: spot price fluctuation, committed-use discounts, and the changing availability of different instance types. In general, CPU instances tend to switch every 18–24 months and GPU every 12–18 months. Each new generation can alter the optimal cost and performance configuration.

Importantly, a higher hourly price does not imply a worse choice. When newer hardware such as H4D becomes available (Google Cloud’s newest HPC-optimized compute instance using 5th Generation AMD EPYC), it can provide improvements over the preceding H3 generation (Intel’s 4th generation Xeon platform) despite being more expensive per hour, because the performance gain shortens runtime enough to lower the overall cost of the job. Optimising for the hourly rate alone is therefore not the aim. Instead, both the price and performance must be considered and these shift every time the underlying options change. The same can be true when appropriately sizing the memory of compute nodes.

The visibility gap

As well as the problem of selecting a good configuration, there is a lack of visibility across the job lifecycle. Many cloud HPC environments do not provide reliable cost forecasts, real-time monitoring of accumulating spend during execution, alerting when a run deviates from expectation, or enforcement of budget limits or resource constraints. Without these controls, costs are difficult to anticipate and can unexpectedly increase.

A different approach

An alternative is to change the interface between the user and the scheduler. Rather than requiring users to specify low-level resources (e.g., cores, memory, or a particular instance type), they can supply outcomes and constraints, like budget, deadline, and priority. The scheduler then uses historical job execution data to select job settings that satisfy those limits while optimising for the more traditional constraints of cost and performance, but can also consider overall energy usage or carbon limits (which can consider regional carbon intensity and intra-day variations).

This reframing matters because scheduling decisions can directly impact cost. Consider a workload that is typically run on an H100 GPU because it must complete within the same day. If the same work is instead needed only on an inter-day basis, an L4 may be able to meet the deadline at a lower cost. The better configuration therefore depends on both the workload and when the user needs the result. Supplying the deadline explicitly lets the scheduler exploit these opportunities rather than defaulting to the highest-performance hardware regardless of need.

The optimization model

This scheduling decision can be posed as an optimization problem. One complication is that this optimization model needs to account for uncertainty in the cloud environment since job completion prices, spot availability, and future demand are not known in advance. This problem can be expressed as a two-stage stochastic mixed-integer program (MIP).

In the first stage, the system commits to a policy: which job classes may use which placements (across providers, regions, instance types, and purchase models), together with any baseline reserved capacity. In the second stage, once a particular realisation of prices and demand is observed, the system takes recourse – the scenario-specific assignment, capacity purchases, and deferral or restart decisions that adapt the policy to what actually occurred. At a high level, this means that the best policy is chosen now, while accounting for the expected cost of what happens later under uncertainty.

The objective is to minimise the first-stage policy cost plus the expected cost of recourse over the distribution of possible futures:

\(min_{y,\,R}\quad \underbrace{C^{\text{policy}}(y,R)}_{\text{first stage}} \;+\; \mathbb{E}_{\omega}\!\left[\,\underbrace{Q(y,R,\omega)}_{\text{second stage}}\,\right]\)

Here $y$ is the placement policy variables (whether a job class is allowed to run on a certain provider/region/instance type/purchase model), $R$ represents reserved capacity variables, and $\omega$ indexes an uncertainty scenario drawn from the space of possible price, demand, and availability outcomes. Since the expectation cannot be evaluated in closed form, it is approximated by sampling a finite set of scenarios, which turns the problem into a solvable deterministic-equivalent MIP.

In this MIP, constraints are added to enforce that the budget, deadline, energy usage, and carbon limits hold within a certain risk tolerance. These are modelled as chance constraints which cap the probability of a violation, allowing a breach in a limited amount of the sampled scenarios. This means that deadlines and budgets can be treated as hard, soft, or risk-based, and the acceptable probability of overrun becomes a limit set by administrators.

The proposed system

The system is composed of three parts:

  • A command-line interface:  where the user submits a job together with its constraints.
  • An optimization layer: evaluates configurations, estimates cost and runtime, and selects the resources to use, routing the job to the appropriate partition as required.
  • An administrator dashboard: shows cost and performance data, providing the forecasting, monitoring, and oversight that the current visibility gap leaves absent and can be seen in the figures below.

Is your cloud HPC setup as cost-effective as it could be?

This system allows HPC job scheduling to be a data-driven decision, and gives administrators the information needed to manage cloud HPC expenses.

nAG’s HPC specialists help organisations assess their workloads across instance types, pricing models and providers to find the configuration that delivers results on time and on budget.