Cost Optimization employing contracted cloud resources

SukYeon Jung
4 min readMar 26, 2021

Cloud service providers offer discounts to users who enter into contracts using pre-defined amounts of cloud resources for a specific period. The discount rates vary significantly based on contract terms, including duration, payment terms, and types of cloud resources. Examples of these discount programs include reserved instances and savings plans offered by AWS, as well as reserved virtual machine instances offered by Azure.

Optimizing the purchase and utilization of contracted cloud resources is crucial for cloud cost optimization. Buying more than necessary leads to under-utilization and wasted money on unused resources. Conversely, purchasing less than required results in over-utilization, leaving potential savings untapped. Therefore, accurately predicting a company’s future cloud resource needs and selecting the right purchasing point based on these predictions is essential.

However, several factors prevent companies from utilizing discounted resources optimally. These factors include a combination of unsystematic and systematic risks. Unsystematic risk arises from firm-specific issues, such as errors in predictions and cognitive and emotional biases of operators. On the other hand, systematic risk refers to inherent risks that cannot be eliminated by a single firm’s optimal decisions. While unsystematic risks can be minimized through company decisions, systematic risks persist even with optimal choices. The graph below illustrates the loss resulting from unsystematic risks.

(Graph 1: Loss resulted from unsystematic risks)

[Unsystematic Risks]

Calculating how much contracted cloud resources should be purchased within a defined timespan involves maximizing the profit from the discount. The benefit of the discount can be calculated using the following formula:

[Average % of discount of contracted cloud resources * (total purchase amount — unused purchase amount)] — [Average on-demand price * (1 — Average % of discount of contracted cloud resources) * unused purchase amount]

Where ‘Average % of discount of contracted cloud resources’ and ‘Average on-demand price’ are constant numbers within the defined timespan. However, one challenge is that the optimal purchase point obtained using past data can be misleading for future decisions, as future cloud resource usage may deviate from historical data, leading to prediction errors.

Cognitive and emotional biases of operators also contribute to unsystematic risks. Even after calculating the optimal purchase point, many operators hesitate to purchase at that level due to biases. Common biases include loss aversion bias, where individuals value avoiding losses more than gaining the same amount in monetary terms, and status quo bias, where people prefer maintaining the current state unless significant issues arise. These biases influence operators to purchase fewer contracted discount instances than they should.

One suggested method to minimize unsystematic risk is to break down resource usage predictions by each department that utilizes them. Each department can make predictions based on its business plan, resulting in deviations from actual usage, sometimes leading to overutilization or underutilization. However, as the number of predictions increases, the effects of over/underutilization cancel out, leading to normalization. Still, industry-level or country-level effects can cause significant deviations. Once the prediction is made and the optimal purchase point is calculated, operators can make purchases without addressing business concerns, mitigating cognitive and emotional biases.

[Systematic Risks]

After minimizing unsystematic risk, the question arises: “Can we increase the coverage of contracted discounts applied?” From an individual company’s perspective, the answer is “no.” Purchasing more than the “optimal purchase point for a single firm” (refer to Graph 2) would result in losses from wasted contracted instances exceeding the gains acquired from discounts.

(Graph 2: Loss resulted from systematic risks)

However, if a large number of firms are grouped together, and their resources can be managed collectively (forming a cloud optimization portfolio), losses resulting from systematic risks can be reduced. As the number of firms in the portfolio increases, the standard deviation of the portfolio decreases, leading to greater coverage of contracted discounts. The extent of loss from systematic risks depends on factors such as the number of companies, correlation among the companies, volatility of each company, and total expenditure of each company. Increasing the number of companies, reducing correlation, lowering volatility, and having a smaller deviation from the average portfolio total expenditure (fewer outliers) lead to a higher level of coverage where contracted discounts can be applied.

--

--

SukYeon Jung

Writes about cloud computing, company cultures, and finance