Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

1

ME 312 Project Report

Optimizing Cloud Computing and Storage Costs


ME 312 Project | Group 9
Nikhil Thakre | Dhruv Patel | Anjali Ajay Prabhakar | Jayant Dharmale

(210100161) (21010109) (210100016) (210100115)

1. INTRODUCTION 2. OBJECTIVES:
The effective management of cloud computing and Our objective here is to optimize the simplified system of
storage resources is paramount for Software as a Service cloud computing that we have used in the domains of
(SAAS) companies striving to balance performance with cost,space and time while keeping in mind some other
cost efficiency. By exploring strategies to minimize external factors so as to understand the results better, and
expenditure without compromising operational efficacy, the interdependence of the 3.
this study aims to provide valuable insights for SAAS
enterprises navigating the complexities of cloud 3. ALGORITHM:
infrastructure management. In the use of the greedy process, we used the hillside
algorithm to minimize the cost with budget and space
The motivation behind this study arises from the (optional) constraints. Going through various iterations
pervasive reliance of SAAS companies on cloud there were 2 major problems that we faced with the use
computing and storage services, which often constitute a of such an algorithm. Firstly, the time taken for running
substantial portion of their operational expenses. the algorithm is much longer compared to a model
Recognizing the imperative to optimize resource approach. Secondly, there are higher errors as this
allocation in the face of finite financial resources, this process/algorithm simply focuses on local
endeavor seeks to uncover strategies for mitigating costs minima/maxima(for profit) rather than the global
while ensuring scalability and performance. counterpart.

Assuming a company requires some number of resources Variables : Reserved and On-Demand Instances
daily. This need is different for different days, depending Constraints: Total Budget constraint,daily demand
on various factors like user traffic or internal testing. fulfillment of instances required.
These resources can be bought from cloud service
providers like AWS, Azure, or Google Cloud. 4. COST OPTIMISATION

For the project, we took the case of AWS where these In the initial understanding of the simplified system we
resources can be bought in the form of EC2 instances. EC2 have created, cost optimisation becomes the first step to
stands for Elastic Compute Cloud, which means these understand the process. Here, variables are Reserved
instances can be customized based on the company’s and On-Demand Instances and the constraint is simply
needs. So the primary aim of this project is to find how that of Total no. of instances per day. Firstly we took a
different factors affect the total cost to the company and constant discount d, irrespective of the reserved
how it can be optimized. instances bought.

For this project, we took 2 types of instances, namely


reserved instance and on-demand instance. For this
project, we assumed that reserved instances are bought
at the start of the month. A contact number of instances
will be provided on a daily basis and if not used these
will be wasted. On the other hand, on-demand instances
can be bought anytime during the month whenever extra
instances are required. Reserved instances can be bought
with a discount compared to on-demand instances. The
discount depends on the amount of reserved instances
bought, which can be up to 80%. So the dilemma here is
to decide how many reserved instances are to be bought
at the start of the month and how much should the
company rely on on-demand instances.
Required instances
2
ME 312 Project Report

In this project, we create a hypothetical distribution of


the required instances over the month.

Variables : Reserved Instances (Xr) and On-Demand


Instances (Xod)

Constraints: Daily demand fulfillment of instances


required i.e. Xr + X0d >= n

Objective function : minimize( 30 * Xr * C * (1 - d) +


sum(Xod) * C)

Known data : Cost of instances (C), daily need of


instances (n).
Solution we got: In this plot, we can see that total cost decreases as the
discount increases, even though the wasted instances
increase. This is quite understandable, yet the
distribution of total cost vs instances wasted is
interesting, as given below.

Optimal Solution Found:


Total Cost: 33360.0
Reserved Instances: 115.0

5. DIFFERENT DISCOUNTS
The discount depends on the number of required It the above plot, for multiple values of discount, we got
instances bought. So we need to see how the previous some number of instances wasted while the total cost
results change with the change in discount. So we tried changes.
to get various results on different variables.
Following are the results: Later, we tried to update the objective function and
include discount as a variable.
Most basic assumption of discount would be to make it
vary linearly with the reserved instances. However we
were not able to find a proper solution when discount
was a linear function of reserved instances, Xr.
So we took the discount as a step function and made an
objective function using binary functions.

6. GROWTH FUNCTION
Given that we are taking a distribution of instances
required from last month. We implemented a growth
function which can be considered as a prediction
function which modifies the past data based on various
factors like trends, news,etc.
We for example have taken an exponential function in
In this plot, we can see that as the discount increases, the our implementation .
number of instances that are wasted, that is the reserved
instances that were not used, increases.
3
ME 312 Project Report

Figure 1 : Instances and space used plot

7. SPACE AND COST OPTIMISATION


In optimizing cloud computing, variables like Reserved Optimal Solution Found:
and On-Demand Instances must balance cost and
productivity. Constraints include budget and spatial
Total Cost: 25258.8
limitations, while the objective function minimizes total
cost and space. Assumptions prioritize Reserved
Instances for cost efficiency, mitigated by strategic Reserved Instances: 144.0
On-Demand Instance procurement for productivity
enhancement. Total Space Cost: 5442.0

Variables : Reserved and On-Demand Instances Total Space used: 4872.0


Constraints: Total Budget constraint , Total space
constraint , daily demand fulfillment of instances
required. 8.INTEGRATION OF CPU & GPU
Objective function : minimize(w * total_cost + (1 - w) * Incorporating both CPU and GPU into cost and space
total_space)
w=weight factor optimization endeavors presents a complex task;
upgrading necessitates strategic consideration of their
Assumptions : Space required for computing is also respective cost implications and spatial requirements.
important and more space usage reduces productivity so Achieving this optimization entails striking a delicate
now we optimize both cost and space.
balance between maximizing computational efficiency
Known data : Cost of instances, space occupied by and managing resource allocation effectively.
instances , daily need of instances,weight parameter
value Variables : Reserved and On-Demand Instances for
CPU & GPU separately
Results : Constraints: Total Budget constraint , total space
constraint , daily demand fulfillment of instances
required , total GPU usage constraint and total CPU
usage constraint
4
ME 312 Project Report

GPU_space: 18489.230769230773
Objective function : minimize(w * total_cost + (1 - w) * CPU_space: 31510.769230769223
total_space)
w=weight factor Space_used: 50000.0
Assumptions : Space and cost of instances computed on
CPU and GPU are different and the number of CPU &
GPU used also vary for each reserved and on demand. 9. TIME , SPACE AND OPTIMISATION :

Known data : Cost of instances for CPU & GPU, space Incorporating time optimization alongside cost and
occupied by instances in GPU & CPU , daily need of space considerations further complicates the integration
instances,weight parameter value
of CPU and GPU, as upgrades must also account for
minimizing processing time. Achieving this
comprehensive optimization requires meticulous
Results :
planning to balance cost-effectiveness, spatial efficiency,
and timely task completion.

Variables : Reserved and On-Demand Instances for


CPU & GPU separately , time taken by CPU & GPU
separately .
Constraints: Total Budget constraint, total space
constraint, daily demand fulfillment of instances
required, total GPU usage constraint and total CPU
usage constraint
Objective function : minimize(w * total_cost + (1 - w) *
total_space)
w=weight factor
Assumptions : Time varies for computing an instance on
CPU and on GPU.
Known data : Cost of instances for CPU & GPU, space
occupied by instances in GPU & CPU , daily need of
instances,weight parameter value, time parameter value.

Results :

Optimal Solution Found:


Reserved Instances: 181.55128205128204
GPUfor reserved: 50.25641025641027
GPU for on demand: 41.34615384615383
total GPU: 91.6025641025641
CPUfor reserved: 131.29487179487177
CPU for ondemand:0
totalCPU:131.29487179487177
total_ondemand Instances: 41.34615
Total Cost: 121963.07692307688
5
ME 312 Project Report

4. Jayant:
● Variable discount
● Presentation

10. Link to the code and materials


1. code -
https://colab.research.google.com/drive/1cpS2B
gJs8dRHP53gycffOhBF8mPnFqJh?usp=sharing
2. Algorithm (codes):
https://colab.research.google.com/drive/152Vq
krClR7naUDA5ybh1P7k_5SVTf9wI?usp=sharin
g
https://colab.research.google.com/drive/1INotD
Optimal Solution Found:
VQCGGU4qrg0u9mVHx2nF6DQi-1F?usp=shari
Reserved Instances: 178.0 ng
total GPU: 94.13333333333333 https://colab.research.google.com/drive/1Bufef
totalCPU:137.86666666666662 Qff5HI99x5m86HHGl2HrJy4rIph?usp=sharing
total_ondemand Instances:
53.99999999999993 https://colab.research.google.com/drive/1xwA3
Total time(hrs): 1753.3666666666666 V1CjCuP5Li7xUeEjqKGuyc25Qt8a?usp=sharing
Total Cost: 359903.99999999994
GPU_space: 14966.400000000021
CPU_space: 33087.999999999985 3. presentation-https://www.canva.com/design/D
AGEAaZwi5I/DNl3i83YjN2iLr7j20ZN6Q/edit
10. Contributions:
1. Nikhil Thakre (210100161) -
● Integration of growth function and cost
optimization for a month .
● Coding for variable discount function
● Cost and space optimization with weighted
optimization.
● Cost and space optimization with integration of
CPU and GPU complexity (4 variables, 5
constraints)
● Time complexity integration in cost & space
optimisation
● Plottings and visualizations of the above work

2. Dhruv
● Defining the problem statement and factors to
be included in the project.
● Formulating the cost optimization model and
implementing its code.
● Exploring the effect of discount and defining the
variable discount model.
● Visualization and plots.

3. Anjali Ajay Prabhakar (210100016)

● Basic Cost Optimization formulation + coding


● Algorithm for the basic cost optimization using
hillside algorithm, creating required snippets for
budget constraint, loss factor and max. profit.
● Algorithm with space optimization constraints
for the non-cost optimization model.

You might also like