V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Recommended Services
Amazon Web Services
LeanCloud
New Relic
ClearDB
dangyuluo
V2EX  ›  云计算

AWS Spot Instance 平均多久会被回收?

  •  
  •   dangyuluo · 2019-10-09 01:03:14 +08:00 · 4379 次点击
    这是一个创建于 1651 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我们在用 AWS EKS 作为服务器集群,想用 Spot Instance 来省一些钱。请问大家有没有经验,Spot Instances 平均来讲多久会被系统回收?谢谢。

    us-west-2 区

    15 条回复    2019-10-11 09:05:25 +08:00
    lovestudykid
        1
    lovestudykid  
       2019-10-09 02:37:21 +08:00
    这个不是看你设的价格多少么?设的价格高,就很安全
    binux
        2
    binux  
       2019-10-09 02:41:39 +08:00
    面对面问过 AWS support,这是机密,不管怎么问就是不告诉你。你自己试。
    dangyuluo
        3
    dangyuluo  
    OP
       2019-10-09 02:42:54 +08:00
    @lovestudykid 是这样么? 那么如果我设置成 on demand 的价格,岂不是永远不会被关掉?
    lovestudykid
        4
    lovestudykid  
       2019-10-09 03:11:33 +08:00
    @dangyuluo 额,Amazon 的确是承诺不会高于 on demand 价格,但是它还说了如果需求太高也有可能终止,这个就不知道怎么看了。我也就是偶尔用用它的 GPU 节点,没有你这种长时间使用的经验,还是不误导你了。
    binux
        5
    binux  
       2019-10-09 03:48:54 +08:00
    @lovestudykid #1 现在不是竞价模式了,terminate 和价格无关了。
    dangyuluo
        6
    dangyuluo  
    OP
       2019-10-09 03:52:06 +08:00
    @binux 也就是说哪怕报价再高,AWS 也会时不时关掉你的机器是么
    binux
        7
    binux  
       2019-10-09 04:25:39 +08:00   ❤️ 1
    @dangyuluo #6 我这有一份我们最近 7 天被 instance-terminated-capacity-oversubscribed 的机器类型和运行时长(秒)。我们最近 7 天 interrupt rate ( 被 AWS terminate / 所有 terminate )是 18%,你可以参考

    us-east-1c c5.xlarge 11043
    us-east-1d c5.xlarge 67069
    us-east-1d c5.xlarge 15290
    us-east-1d c5.xlarge 511
    us-east-1d c5.xlarge 3700
    us-east-1d c5.xlarge 1131
    us-east-1d c5.xlarge 1233
    us-east-1c c5.xlarge 148
    us-east-1b c5.xlarge 152
    us-east-1f c5.xlarge 4041
    us-east-1d c5.xlarge 283
    us-east-1f c5.xlarge 2375
    us-east-1f c5.xlarge 1619
    us-east-1b c5.xlarge 1060
    us-east-1b c5.xlarge 58
    us-east-1d c5.xlarge 474
    us-east-1d c5.xlarge 4831
    us-east-1a c5.xlarge 419497
    us-east-1c c5.xlarge 2252
    us-east-1d c5.xlarge 734
    us-east-1d c5.xlarge 528
    us-east-1b c5.xlarge 220
    us-east-1d c5.xlarge 2486
    us-east-1d c5.xlarge 679
    us-east-1b c5.xlarge 285
    us-east-1d c5.xlarge 388
    us-east-1b c5.xlarge 1006
    us-east-1d c5.xlarge 5554
    us-east-1d c5.xlarge 539
    us-east-1b c5.xlarge 105
    us-east-1b c5.xlarge 26
    us-east-1f c5.xlarge 10295
    binux
        8
    binux  
       2019-10-09 04:28:41 +08:00
    @binux #7 另外我们还有用 c4.large, m4.xlarge, m4.large, t3.medium 都没有被 instance-terminated-capacity-oversubscribed
    dangyuluo
        9
    dangyuluo  
    OP
       2019-10-09 05:02:17 +08:00
    @binux 简直有用了,是在 billing 里看到的么?还是 cloudwatch?
    binux
        10
    binux  
       2019-10-09 05:07:45 +08:00   ❤️ 2
    @dangyuluo #9
    `aws ec2 describe-spot-instance-requests --filters Name=status-code,Values=instance-terminated-capacity-oversubscribed | jq -r '.SpotInstanceRequests[] | [.LaunchedAvailabilityZone, .LaunchSpecification.InstanceType, (.Status.UpdateTime | strptime("%Y-%m-%dT%H:%M:%S.000Z") | mktime) - (.CreateTime | strptime("%Y-%m-%dT%H:%M:%S.000Z") | mktime)] | join("\t")'`
    amshedge
        11
    amshedge  
       2019-10-09 09:18:17 +08:00
    如果怕关,,就用 define duration workloads,,不过价格感人。。。。。
    knightdf
        12
    knightdf  
       2019-10-09 09:31:28 +08:00
    一般跑几个小时都是够的,价格波动不是特别大,所以看你设置的价格
    ddou
        13
    ddou  
       2019-10-10 23:27:29 +08:00
    @dangyuluo 价格跟 on demand 一样,就没必要用 spot instance 了吧
    dangyuluo
        14
    dangyuluo  
    OP
       2019-10-11 01:19:13 +08:00
    @ddou 那是最高报价,并不是最终计价价格
    ddou
        15
    ddou  
       2019-10-11 09:05:24 +08:00 via Android
    @dangyuluo 是的 我的意思是如果竞标价设成最高价,就没必要用 spot 了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2981 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 15:12 · PVG 23:12 · LAX 08:12 · JFK 11:12
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.