20

I am looking at the pricing of various cloud computing platforms, particularly Amazon's EC2, and a lot of the quotes are based on a unit called an Instance-Hour.

I am trying to get a handle on the exact definition of an instance-hour to better compare the costs of continuing to host a web-application versus putting it out on the cloud.

(1) Does it correspond to any of the Windows performance counters in such a way that I could benchmark our current implmentation and use it in their pricing calculators?

(2) How does a multi-processor instance figure into the instance-hour calculation?

Gautam
  • 7,868
  • 12
  • 64
  • 105
JohnFx
  • 34,542
  • 18
  • 104
  • 162

3 Answers3

16

An instance hour is simply a regular hour where the instance was available to you, wether you used it or not. Amazon has priced their different types of instances differently, so you pay for the type of resource you are getting, not how much you use it.

So... 1. No, it's just a regular hour. 2. It doesn't, it's already factored into the price you pay for the instance pr hour.

kasperjj
  • 3,632
  • 27
  • 25
  • What a stupid way to mark prices. why not mark a monthly price ? why do I need to multiply the hour rate to get my monthly bill. stupid..... – Dani Feb 08 '15 at 07:15
  • They should be better about showing samples of prices for monthly or yearly usage... but the main advantage compared to a regular hosted server or vm is exactly that you can pay by the hour. Maybe spin up a clone of your setup for just a couple of hours to test out new features or add a couple of web frontends during peak hours and pay only for what you actually need! – kasperjj Feb 08 '15 at 18:21
  • So why am I charged for more hours than there are in a month. – Antony D'Andrea Nov 18 '15 at 06:58
  • 3
    @AntonyD'Andrea They charge a full hour every time you turn it on, so if you repeatedly turn it on and off you could get billed for more than one instance hour within the same actual hour. – JohnFx Jan 06 '17 at 19:14
  • 1
    @Dani They do it by hour because you don't have to buy the hours in a monthly block. You can turn it on for half a day at the end of the month and only pay that. AWS has calculator widgets to plan out the total monthly cost. – JohnFx Jan 06 '17 at 19:15
  • @JohnFx I get that, but I wasn't turning it off and on. In fact, I didn't touch it for 2 years. – Antony D'Andrea Jan 09 '17 at 15:40
6

Note also that instance hours are billed rounded up (for Amazon EC2). So starting up an instance and immediately shutting it down again incurs the cost of 1 instance hour.

user55400
  • 3,929
  • 1
  • 21
  • 13
  • 3
    That is a good point. If you open an instance twice and close it quickly within the same hour does that get counted as 1 hour or two? – JohnFx Jan 15 '09 at 19:33
  • The reason I ask is that during configuration I am pretty good to shut it down when I get called away on other tasks and only keep it running while I am actually working on it. Depending on how this is calculated I might be better off leaving it up rather than turning it on and off repeatedly. – JohnFx Jan 15 '09 at 19:34
1

if you plan to start/stop the AWS EMR cluster rapidly within a single hour, and you want to avoid being billed for a full hour each time you do so, then start the cluster with the --alive argument from cli, which means to leave it running.

then rapidly add steps to the same cluster, instead: http://docs.aws.amazon.com/ElasticMapReduce/latest/DeveloperGuide/AddingStepstoaJobFlow.html

Don't forget to stop the cluster when you're done! :)

Mike S
  • 51
  • 4
  • Also, if you're using Python with Boto3 (AWS' Python SDK) then under https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/emr.html#EMR.Client.run_job_flow you can remove `ScaleDownBehavior='TERMINATE_AT_INSTANCE_HOUR'|'TERMINATE_AT_TASK_COMPLETION'` and set these two values to true `'KeepJobFlowAliveWhenNoSteps': True, 'TerminationProtected': True` just do them in the correct locations of the JSON schema using the template on that link as your guide. – Kyle Bridenstine Sep 14 '18 at 16:22