Opened 4 years ago

Last modified 22 months ago

#2898 new enhancement

EC2 spot instance bidding is too arcane

Reported by: bgilbert Owned by:
Priority: minor Milestone: undecided
Version: 0.8.9 Keywords: ec2


EC2LatentBuildSlave computes its spot price bid by requesting the 24-hour price history, multiplying its average by a constant value, and checking that this does not exceed a configured maximum. There are several problems with this:

  1. If the selected bid price is greater than the configured maximum, EC2LatentBuildSlave raises an exception. It does not attempt to check that the current spot price is actually above this maximum, so it may give up when spot instances are actually available at an acceptable price. It would be better to always make a bid, but cap the bid price at the configured maximum (i.e., target_price = min(target_price, max_spot_price)).
  1. On Eight, a hardcoded product_description is used to fetch spot price history. As a result, decisions may be based on the wrong history.
  1. When setting up EC2 spot instances, I would like to be able to configure a single value: the maximum hourly cost. If the current spot price is <= that threshold, the instance should start; otherwise, the instance should not start. At first glance, it appears this can be accomplished by configuring the desired max_spot_price and a huge price_multiplier, but that does not work because of point 1: launches will unconditionally fail.

It's not clear to me what the current logic is trying to accomplish. IMO the correct design is for EC2LatentBuildSlave to simply bid the max_spot_price every time. What am I missing?

Change History (2)

comment:1 Changed 4 years ago by sa2ajj

  • Keywords ec2 added

comment:2 Changed 22 months ago by morrone

I believe that all three of these are now fixed on master, and contained in 0.9.0-rc1.

Note: See TracTickets for help on using tickets.