Live data from Hacker News

AWS announces per-second billing for EC2 instances

techcrunch.com

101–110 of 149 posts

Re: AWS announces per-second billing for EC2 instances

#101
post #80
post #51

Earlier quoted context omitted.

Wait what, would they expose the raw SSD pci device to your vm? What's stopping you from scraping all the leftover data from the previous customer?

I've seen some hints that GCE uses NVMe emulation not PCI passthrough. This would allow the hypervisor to implement features like live migration.

I find it interesting to think about virtualization on a spectrum with passthrough at one end and pure emulation at the other. Particularly when applied to I/O peripherals, if the bulk of the I/O can effectively be classed as payload, stepping slightly away from passthrough while maintaining roughly the same layer of abstraction grants the implementer considerable liberties in implementation with very little overhead.

If one were to look at storage, specifically, the move to 4k block sizes would seem like a particular boon in terms of increasing the volume of data covered by any given IOP.

Re: AWS announces per-second billing for EC2 instances

#102
post #4

That's sure nice, but I'm waiting for AWS to switch to automatic sustained use discounts [0] like GCP offers. [0]: https://cloud.google.com/compute/docs/sustained-use-discount...

That is cool if you maintain a fixed number of instances but it doesn't seem to be very cost efficient if you are implementing autoscale

GCP billing is all calculated on a cpus/ram/hours basis. You're basically buying capacity units (and can even commit long-term for more discount) and can use that capacity in whatever way you want.

Running 2x 4cpu instances for 1 month is the same as 4x 2cpu instances for 1 month, and will come out the same even if you switch in the middle.

Re: AWS announces per-second billing for EC2 instances

#103
post #95
post #66

Earlier quoted context omitted.

Remember that AWS has been in the game for over a decade. Per-hour billing was amazing when it came in. Also, is the economic incentive really that huge? Or is it just a nicety?

it's totally dependant on your workload. for some users there will be absolutely no difference, for others it could easily be thousands or tens of thousands of dollars of savings over a year.

Thanks, I stand corrected. I've read through a few other use cases in the comments here and I can see now that there's scope for savings, depending on workload.

Re: AWS announces per-second billing for EC2 instances

#104

Earlier quoted context omitted.

You can implement this with a simple auto-scaling group or write a small Lambda function which runs at a certain time to start/stop the instance

You typically want exactly 0 or 1 instances for testing instances. I don't recall autoscaling groups able to do that.

This is entirely possible. Scheduled actions can make this happen on a schedule (simply schedule desired-capacity=1 when you want it on and desired-capacity=0 when you want it off). Or you can simply run a command to do it on demand.

Re: AWS announces per-second billing for EC2 instances

#105
post #53

Earlier quoted context omitted.

It's really really difficult to be able to turn on and off instances as needed, like turn a test instance on in the morning when developers come in and turn it off in the evening when they leave.

Yes I still don’t know why this feature isn’t in the AWS Console yet. Even Oracle Cloud of all people has this feature in their Virtual Compute.

It's, just that AWS just has a building blocks.

To implement it use autoscaling group of size of 1. Then change desired to 0 or 1 based on need.

Re: AWS announces per-second billing for EC2 instances

#106
post #41

Earlier quoted context omitted.

They would legitimately lose a lot of money if they did this now (and I would argue, wouldn't make up for it in market share). Most companies I work with who switch to AWS think it's a 1:1 conversion in terms of cost from a data center and pretty much just "leave AWS on" not realizing that they are not only paying for computing cost but the hidden cost of being able to scale up more instances quickly.

It's really really difficult to be able to turn on and off instances as needed, like turn a test instance on in the morning when developers come in and turn it off in the evening when they leave.

I don't understand. If autoscaling groups are too complicated, just create the instance and stop and start it when you want. You can control permissions via IAM groups and instance tags if you need to be careful. Or you can indirect through a lambda if you need to be super careful.

Good morning! `aws ec2 start-instances --instance-ids i-12345678900`

Good night! `aws ec2 stop-instances --instance-ids i-12345678900`

Re: AWS announces per-second billing for EC2 instances

#107
post #42

I once considered writing an EC2 autoscaler that knew the exact timestamps of the instances so that it could avoid shutting down VMs that still had 59 minutes of "free" time left because they'd been up across another hour-long threshold. That sort of nonsense logic shouldn't be useful, but Amazon was giving a huge economic incentive for it. This is certainly a long time coming.

If it helps, AWS' default auto scaling algorithm specifically takes into account instances which are nearest to their next billing hour and prioritizes those for termination accordingly to, in theory, save money.

Re: AWS announces per-second billing for EC2 instances

#108
post #16

Earlier quoted context omitted.

GCP VMs are per-minute, with a minimum of 10 minutes (vs AWS' new minimum of 1 minute). Second resolution is nice, but I doubt it makes much difference in pricing for most workloads. https://cloud.google.com/compute/pricing#billingmodel Azure's containers don't use a full VM-- they're more like AWS Lambda or other serverless frameworks, so they do per-second billing with no minimums. Disclaimer: I work at Google on C…

Hyper.sh runs docker containers, not VM's, and has per-second billing with a minimum of 10s. I really want to use them to parallelise CI test runs, but haven't gotten round to setting this up yet.

Check https://github.com/hyperhq/hykins

Re: AWS announces per-second billing for EC2 instances

#109
I think the per-second billing is off the point. How does it help, if the EC2 instance takes tens of seconds to launch, and tens of seconds to bootstrap?

To make the most of per-second billing, the compute unit should be deployed within seconds, e.g. immutable. prebaked container. You launch containers on demand, and pay by seconds.

Re: AWS announces per-second billing for EC2 instances

#110
post #87
post #86

Earlier quoted context omitted.

Tag it with something like shutdown=non-biz-hours, or can even specify a schedule that a lambda function can pick up each minute or hour and parse to stop/start any instance that falls within that window.

Well that works if you're a startup in one timezone with no teams depending on your service. If you work on a larger company, it's quite possible the sun never sets on your project (west coast, east coast, Europe, India, Australia or SE Asia)

If the sun never sets on your project, then you probably don't want to shut it down because you're using it 24x7.

But since a Lambda is a program, you can make the criteria as complex as you like.

Tag it with "shutdown=non-biz-hours", and "timezones=UTC-7,UTC+0,UTC+5:30" and your shutdown script can figure out when it's outside of business hours in all of those timezones and shut it down.

Post reply on HN