<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <issn pub-type="ppub">0167-739X</issn>
    </journal-meta>
    <article-meta>
      <article-id pub-id-type="doi">10.1016/j.future.2012.06.012</article-id>
      <title-group>
        <article-title>Optimal Strategy Modelling in an Online Auction for the Rent of Computing Resources</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Anna Ivashko</string-name>
          <email>aivashko@krc.karelia.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Institute of Applied Mathematical Research of the Karelian Research Centre of the Russian Academy of Sciences</institution>
          ,
          <addr-line>Pushkinskaya Str., 11, Petrozavodsk, 185910</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Petrozavodsk State University</institution>
          ,
          <addr-line>Lenina Str., 33, Petrozavodsk, 185910</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>and George Safonov</institution>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2012</year>
      </pub-date>
      <volume>12033</volume>
      <issue>6481231</issue>
      <abstract>
        <p>We consider the problem of optimal bid pricing in an auction for cloud computing resource allocation. The multistage model connected with the full-information best-choice problem is investigated. In this model, users set bids as a sequence of thresholds at each step to minimize the expected resource rent price. A form of the spot price distribution function is proposed based on real-life Amazon EC2 spot price dynamics. The optimal bid values, mean instance rent price and average step for buying the resource were found through simulations.</p>
      </abstract>
      <kwd-group>
        <kwd>Cloud Computing</kwd>
        <kwd>Spot Instance</kwd>
        <kwd>Mathematical Modeling</kwd>
        <kwd>Best-choice Problem</kwd>
        <kwd>Amazon EC2</kwd>
        <kwd>Threshold Strategies</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Cloud computing has a leading position in the IT-market, and is constantly
increasing its market share. Public cloud computing resources are accessible, and
allow users who require complex computing or other hardware and software tools
to avoid software and hardware expenses and other costs. Also, these services
respond exibly and quickly to the changing computing needs of the users. Cloud
services have also become increasingly popular in the modern world, where it
became necessary to work remotely. Therefore, the demand for such resources
has lately increased signi cantly. With cloud services available, a user only has
to pay the rent of the computing resource he/she needs and can then start using
it immediately.</p>
      <p>
        One of the major computing resources providers on the web is the cloud
computing platform Amazon EC2 [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Virtual machines on this platform are in
the form of so-called \instances". Amazon EC2 o ers its users various terms
for renting instances. A new type of instances is Spot Instances (SI). SI are
purchased through auction. Users can bid on unused Amazon EC2 capacity.
The spot price changes all the time, and users can monitor purchase prices over
previous periods. Therefore, the problem of optimal bid pricing in an auction
for renting a certain computing resource is of high relevance.
      </p>
      <p>
        In this paper, the following model of an auction for renting a spot resource
(see Ivashko et al. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]) is investigated. The user observes spot prices at discrete
moments of time and wants to buy the instance within a predetermined time
period. At each stage he/she can set their bid. If that bid exceeds the current
spot price, the instance is sold to the user. The objective is to nd the optimal
strategy (minimal bid) that would minimize the cost of getting the instance
within a speci c time period. This model is reduced to the best-choice problem,
which is well-known in the optimal stopping theory.
      </p>
      <p>This paper is structured as follows. Section 2 o ers a brief review of related
works. In Section 3, we outline the spot auction mechanism. The mathematical
model of spot instance auctions is considered, and the strategy for minimizing
the expected spot price is described in Section 4. Next, in Section 5, we
investigate the spot price dynamics and conduct parameter tting for the distribution
function of real data from real-like Amazon SI auctions. Finally, in Section 6, we
present the ndings and conclusions, and draft plans for the future.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Related Works</title>
      <p>Di erent schemes based on competitive prices are used when buying/selling or
renting resources. One can name various auctions and tenders, competition for
computing resources or storage capacity. Cloud computing resources are gaining
signi cance in the IT world. Therefore, a lot of research is going on in the area.</p>
      <p>
        Research papers are dedicated to both exploring the existing pricing
mechanisms and behavior of real data, and proposing new mechanisms. There are
various approaches to analyzing cloud resource pricing. Di erent probabilistic
and statistical pricing models are considered in papers by Kumar et al. [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ],
Abhishek et al. [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ], and by Xu et al. [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Probabilistic models are grounded in the
assumption that spot prices are independent and identically distributed random
variables. Amazon EC2 spot price dynamics has been analyzed by Ben-Yehuda
et al. [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], Cheng et al. [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ], and by Javadi et al. [8]. It is also noted in these papers
that spot prices have a random nature.
      </p>
      <p>An important task is to model the competitive behavior of participants in
various types of auctions. Online auction is the best example of modern markets.
In an auction, it is necessary for a participant to determine his/her optimal
strategy in order to increase the chance of winning.</p>
      <p>Auction designs vary. Mechanisms for bidding in auctions for a computing
resource are proposed in papers by Karunakaran et al. [9], Sowmya, Sundarraj [10],
Tang et al. [11], and Wang et al. [12].</p>
      <p>Optimal stopping models are often used to study the behavior of
participants in socio-economic systems. The optimal stopping problems where the
participants have to take the decision about choosing an item that ful lls certain
criteria are also known as best-choice problems. One of the rst to describe the
classical statement of the best-choice problem was Moser [13]. Such problems
often arise in economics, nance, sociology and politics.</p>
      <p>The users' optimal strategies are often derived using the dynamic
programming method, in which a complex problem can be solved by breaking it down
into simpler sub-problems represented as a recursive sequence. This method has
various applications in di erent spheres, such as the house-selling problem, the
job-search problem, or the mate-choice problem, and is successfully used in
economic contexts for best-choice problems and auctions.</p>
      <p>In some schemes of online auctions for buying an item or resource participants
do not know in advance the exact current price. Each customer can set the
threshold price value (bid) at which he/she agrees to buy the resource. During
the auction the deal is made if the price o ered by a customer exceeds the current
price. An important task is to analyze the behavior of participants in this type
of auction. The optimal behavior of participants of various online auctions has
been studied by the best-choice problem in papers by Harrall et al. [14], Mazalov,
Ivashko [15], Babaio et al. [16].</p>
      <p>
        Ivashko et al. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] applied the best-choice model to determine the optimal
bid value in order to win the auction. The authors considered this probabilistic
model for the cases where spot prices have a uniform distribution on [
        <xref ref-type="bibr" rid="ref1">0,1</xref>
        ] or a
normal distribution. However, further studies prove that the distribution of spot
prices has a more sophisticated structure.
      </p>
      <p>
        In this paper, we use the model proposed by Ivashko et al. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. We assume that
the price dynamics of each spot instance is modeled by a mixture of Gaussian
distributions. This assumption is supported by studies in a paper by Javadi
et al.[8]. We estimated the unknown parameters of the mixture of Gaussian
distributions using the EM-algorithm. Optimal bid values in the auction were
determined and numerically simulated.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Amazon Spot Auctions</title>
      <p>
        Elastic Compute Cloud platform (Amazon EC2) [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] is one of the earliest and
most popular web services o ering the computing resources of the cloud
computing system AWS (Amazon Web Services) for use. The AWS system is located
in several data centers in di erent regions of the world so that the user can nd
the most technically available resource. Resources are available to users in the
form of instances (virtual machines). A client pays a certain per hour fee. He/she
can also choose the type of instances needed for the calculations and decide how
to purchase instances. There are three alternative ways to buy instances.
Ondemand Instances are charged full price. A user can purchase an On-demand
Instance when he/she needs it with no long-term commitments or upfront
payments. Reserved Instances are rented for a xed duration. They provide the
user with a signi cant discount (up to 75%) compared to On-Demand Instance
pricing. The Reserved Instance will always be available in the availability zone
in which it was purchased. Spot Instances (SI) are idle EC2 instances available
for less than the On-Demand price (up to 90% saving). A Spot Instance runs
whenever capacity is available but, unlike On-demand and Reserved Instances,
can be interrupted by the AWS system at any time.
      </p>
      <p>SIs are in high demand among users who do not need to use the resources
continuously. SIs are well-suited for data analysis, batch jobs, background
processing, and optional tasks. SIs are rented through an auction for unused
capacity. Customers bid the maximum cost of instance per hour of use they would
be ready to pay. If their bids exceed the spot price, they win the auction. All
winning customers pay the same price, which is equal to the value of the lowest
winning bid. This closed auction is a Vickrey auction.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Optimal Strategy</title>
      <p>
        This paper examines SIs and the auction for their allocation. The mathematical
best-choice model proposed by Ivashko et al. [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] is used to determine the optimal
bid value in order to win the auction.
      </p>
      <p>The optimal stopping theory deals with the problems of choosing the time to
make a decision based on observing sequentially the random values. The aim is
to maximize the expected payo . In the optimal stopping theory there is a class
of best-choice problems. They arise from real choice processes. The best-choice
problem with full-information is directly related to the problem of optimal bid
pricing in a spot auction.</p>
      <p>
        We describe the best-choice model as follows [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. A customer willing to rent
an SI within a certain time interval observes sequentially the spot prices X1,
X2, X3; : : : as a sequence of independent and identically distributed random
variables from a known continuous cumulative distribution function F (x) on the
interval [pmin; pmax]. pmin corresponds to a minimal possible SI price at the
auction. pmax is a maximal possible price not exceeding the on-demand price.
There are n steps available to win a SI. The customer's strategy is a sequence of
thresholds (bids). He/she makes the bid i before i-th step, i = 1; :::; n. His/her
aim is to minimize the expected spot price for the whole period of time.
      </p>
      <p>Full-information best-choice problems with nite horizon are solved by the
dynamic programming method. Let us nd the optimal behavior of a customer.
If the customer does not win a SI within the period n, he/she will have to buy
it for the maximum price pmax. It makes sense for the customer to buy the SI
at any price below or equal to pmax. So, the bid at the last step is n = pmax.</p>
      <p>Because spot prices are independent and identically distributed random
variables with a continuous cumulative distribution function F (x), the expected SI
n
price at the last step n is equal to R xdF (x). At the step n 1 the customer's
pmin
bid n 1 is the minimum between the current SI price and the expected cost at
the n-th step:
n 1 = E[minfX; ng] =</p>
      <p>minfx; ngdF (x) =
pmax</p>
      <p>Z
pmin</p>
      <p>Z n
pmin
xdF (x) +
pmax
Z
n
ndF (x):
Here, E[X] is the expectation of the random variable X.</p>
      <p>Continuing the process, we get that the optimal bid value i at each step i
is rendered by the system of recurrent equations:
i =
n = pmax;
pmax</p>
      <p>R
pmin
minfx; i+1gdF (x) =</p>
      <p>Ri+1 xf (x)dx + pmRax
pmin
i+1
i+1f (x)dx; i = 1; :::; n
where f (x) is the probability density function of the distribution F (x).</p>
      <p>If the customer's bid 1 at the rst step does not win, the next bid 2 is used
at the second step. Continuing this process, the customer is guaranteed to get
an instance during the time period n with the minimum expected spot price.
1;
(1)
5</p>
    </sec>
    <sec id="sec-5">
      <title>Optimal Strategy Modelling</title>
      <p>We describe a method to derive the strategy for optimal bid pricing. We use real
Amazon EC2 spot prices data [18]. Based on this history, we build the prices'
probability density function and derive the optimal threshold bids using formula
(1). Wolfram Mathematica platform is used for modelling.</p>
      <p>Price histograms are plotted using spot price statistics. Figure 1 shows
examples of price histograms for the instances us-east-1b m4.xlarge linux/UNIX
and us-east-1b m4.2xlarge linux/UNIX.</p>
      <p>Analyzing the data one can construct the prices probability density function,
see Figure 1. We used the following truncated mixture of Gaussian distributions:
b1</p>
      <p>Take for example the optimal strategy modelling for the us-east-1e p2.8xlarge
Linux/UNIX instance over the period of July12{August 30, 2019. We have
N = 200 values of spot prices (see Figure 2).</p>
      <p>Having the data we construct the histogram of prices (Figure 3). The step in
the histogram is 1 + [log2 N ], N = 200.</p>
      <p>Using the data we get in formula (2) b1 = pmin = 2:216; b2 = pmax = 3:048,
where pmin corresponds to the minimum price over the entire period of time,
and pmax corresponds to the maximum price.</p>
      <p>We tested the statistical hypothesis using Pearson's chi-squared test ( 2).
The null hypothesis H0 stated that the frequency distribution of certain events
observed in a sample (using histogram) is consistent with a mixture of two
Gaussian distributions. The alternative hypothesis H1 is that the frequency
distribution does not have the form of a mixture of two Gaussian distributions. Having
run the 2 test at a signi cance level = 0:05, we got P -V alue = 0:801189. As
P -V alue &gt; , so normally we would not reject the null hypothesis.</p>
      <p>We estimate the unknown distribution parameters a1; 1; a2; 2; !1; !2 using
an Expectation Maximization (EM) algorithm. The EM-algorithm is used to
nd maximum likelihood parameters of a statistical model in cases where the
equations cannot be solved directly.</p>
      <p>We consider the vector of the estimated parameters = (!1; !2; a1; a2; 1; 2):
The density function of the normal distribution has the form:</p>
      <p>N (x; aj; j) = p
1
2 j
e
(x aj)2
2 j2 ; j = 1; 2:
Let us consider two steps of the EM-algorithm:
The expectation (E) step:
gij = 2!jN(xi;aj; j) , i = 1; :::; m;</p>
      <p>sP=1 !sN(xi;as; s)
The maximization (M) step:</p>
      <p>m
!j = m1 iP=1 gij;</p>
      <p>1 Pm gijxi;
aj = m!j i=1</p>
      <p>j2 = m1!j iP=m1 gij(xi aj)2; j = 1; 2;
here, m is the number of elements in the sample, gij is the probability that
the observation xi comes from the component j of the mixture of two Gaussian
distributions.</p>
      <p>We should iterate the steps E and M until convergence: until the value
difference between a1, a2 at step h and a1, a2 at step h 1 is less than 10 4.</p>
      <p>The application of the EM-algorithm yielded the estimations shown in
Table 1.</p>
      <p>Next, we get the optimal threshold values (bids) for n = 15 steps of the model
using formula (1) (Table 2). As one can see, the sequence of bids is increasing
with i, i = 1; :::; n.</p>
      <p>To illustrate the optimal behavior let us consider the time period September
5 { 28, 2019 with the number of steps n = 15. In Figure 4 the optimal thresholds
!1
!2
0.0701 0.9299 2.2404 2.6492 0.0149 0.1707
(grey line) and spot prices (black line) are presented at each step. Here, the
acceptance step is i = 13, and the bid value which exceeded the spot price is
equal to 2:5828.</p>
      <p>In Table 3 the results on the optimized mean spot price and mean acceptance
step are given for n = 5, n = 10, n = 15, and for 90 price values from time period
September 7, 2019 { October 2, 2019.</p>
      <p>As illustrated by Table 3, if the number of steps available in an auction
increases, the mean acceptance step also grows, while the mean spot price
decreases. As a result, the more steps are available for participating in the auction,
the lower is the price at which a user can rent the resource.</p>
      <p>n
5
10
15
This paper examines the problem of optimal bid pricing by cloud service users.
The problem is connected with the full-information best-choice problem. Based
on real data dynamics, the spot price distribution is modeled as a mixture of
Gaussian distributions. Thus, we apply the theoretic model to real spot price
dynamics. The optimal bid values, mean instance rent price and the acceptance
step for buying the instance were found through simulations. These values allow
winning the auction while minimizing the expected SI rent price.</p>
      <p>In the future, new models for optimal bid pricing in spot auctions can be
proposed. Various strategies can be compared to identify their respective bene ts
and limitations. We collected the price history during one year and we can use
these data to further research. Also the model where the prices are dependent
random variable can be considered. For this case a new model can be constructed.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>Amazon</given-names>
            <surname>Inc</surname>
          </string-name>
          .
          <article-title>Amazon Elastic Compute Cloud (Amazon EC2)</article-title>
          . http://aws.amazon.com/ec2
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Ivashko</surname>
            ,
            <given-names>E.E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tchernykh</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ivashko</surname>
            ,
            <given-names>A.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Safonov</surname>
            ,
            <given-names>G.R.</given-names>
          </string-name>
          :
          <article-title>Cost-e cient strategy in clouds with spot price uncertainity</article-title>
          .
          <source>Automation and Remote Control</source>
          <volume>81</volume>
          (
          <issue>4</issue>
          ),
          <volume>731</volume>
          {
          <fpage>745</fpage>
          (
          <year>2020</year>
          ). https://doi.org/10.1134/S000511792004013X.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Kumar</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Baranwal</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Raza</surname>
            ,
            <given-names>Z.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Vidyarthi</surname>
            ,
            <given-names>D. P.:</given-names>
          </string-name>
          <article-title>A Survey on Spot Pricing in Cloud Computing</article-title>
          .
          <source>Journal of Network and Systems Management</source>
          ,
          <volume>809</volume>
          {
          <fpage>856</fpage>
          (
          <year>2018</year>
          ). https://doi.org/10.1007/s10922-017-9444-x
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Abhishek</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kash</surname>
            ,
            <given-names>I.A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Key</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          :
          <article-title>Fixed and Market Pricing for Cloud Services</article-title>
          .
          <source>In:Proceedings of the 7th Workshop Economics of Networks System Computer</source>
          (NetE- con
          <year>2012</year>
          ), IEEE Computer Society, Orlando, 20
          <source>March</source>
          <year>2012</year>
          ,
          <volume>157</volume>
          {
          <fpage>162</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Xu</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Li</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Maximizing revenue with dynamic cloud pricing: The in nite horizon case</article-title>
          .
          <source>2012 IEEE International Conference on Communications (ICC)</source>
          , Ottawa, ON,
          <volume>2929</volume>
          {
          <fpage>2933</fpage>
          (
          <year>2012</year>
          ). https://doi.org/10.1109/ICC.
          <year>2012</year>
          .6364013
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Ben-Yehuda</surname>
            ,
            <given-names>A. O.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ben-Yehuda</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schuster</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tsafrir</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Deconstructing Amazon EC2 Spot Instance Pricing</article-title>
          .
          <source>Cloud Computing Technology and Science (Cloud-Com)</source>
          ,
          <source>2011 IEEE Third International Conference on, Athens</source>
          ,
          <volume>304</volume>
          {
          <fpage>311</fpage>
          (
          <year>2011</year>
          ). https://doi.org/10.1109/CloudCom.
          <year>2011</year>
          .48
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7. Cheng,
          <string-name>
            <given-names>H.K.</given-names>
            ,
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Z.</given-names>
            ,
            <surname>Naranjo</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.</surname>
          </string-name>
          :
          <article-title>Cloud computing spot pricing dynamics: Latency and limits to arbitrage</article-title>
          .
          <source>Information Systems Research</source>
          <volume>27</volume>
          (
          <issue>1</issue>
          ),
          <volume>145</volume>
          {
          <fpage>165</fpage>
          (
          <year>2016</year>
          ).
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>