Important news about instance based billing

195 views
Skip to first unread message

Philip

unread,
Sep 2, 2011, 12:19:27 PM9/2/11
to Google App Engine
Hi,

there were many different statements about the instance based billing
which were not clear to everyone. We've asked proppy in the IRC
channel to get us some clarification about the rules that apply to
instance based billing. We formulated some assertions and he forwarded
them to the product managers. I think you are all interested in them:

- In the dashboard instance chart "Active Instances" represent the
instances currently active serving traffic for this application
- In the dashboard instance chart "Total Instances" represent all
instances currently started for this application
- The visual difference between the 2 represent "Idle Instances", i.e:
the settings developers can control using Performance settings
- Developers will be billed for ("Active Instances" + Max "Idle
Instances") and not "Total Instances"

All those assertions are "true". Especially the last one should cut
the costs for most of the app engine users.

Bay

unread,
Sep 2, 2011, 12:22:22 PM9/2/11
to google-a...@googlegroups.com
Thx Philip. 

But it still doesn't change the estimates under Billing History. Those are valid, and those are the ones most people are upset about. Not the graphs.

GAEfan

unread,
Sep 2, 2011, 12:27:16 PM9/2/11
to Google App Engine
Also, all Python users have to note that the estimated charges shown
under Billing History are at the 50% discounted price, which only
lasts until November. Take the top number (the instance hours), and
double it to get the accurate charge. Plus, add the $9.

Philip

unread,
Sep 2, 2011, 12:34:14 PM9/2/11
to Google App Engine
@Bay
If you haven't set "Max Idle Instances" to a low number you most
likely have to face a large increase and have to pay for a scheduler
that doesn't work perfectly. That is IMHO very shady move from Google.
I've set that knob to "2" and expect a huge reduction on my instance
hours bill. First of all the scheduler works way more efficient and if
I use the active instances + 2 for my calculation I will spend a sum
that is acceptable. Lets see how it works out before we jump into
conclusions.

Bay

unread,
Sep 2, 2011, 12:50:24 PM9/2/11
to google-a...@googlegroups.com
Well I can see exactly how it works and I dont need the extra instances. My app serves 0.200 QPS. I'm not jumping to conclusions. I'm just making it.

Philip

unread,
Sep 2, 2011, 1:00:05 PM9/2/11
to Google App Engine
I've seen the screenshot in your other post and it looks like you have
a low traffic app. I think there is a major difference between the
needs of those who have an app like you and those who have an app with
more traffic. I think what you would need is a "Max Instances" knob;
on the other hand that's something larger users don't really need.

I've read on the groups that there is a workaround to force GAE to a
low number of instances: Set "Min Pending Latency" to a very high
value like 15 seconds and "Max Idle Instances" to a very low value
like 1. Maybe that will prevent GAE to launch additional instances for
your app.

Bay

unread,
Sep 2, 2011, 1:05:50 PM9/2/11
to google-a...@googlegroups.com
"Set "Min Pending Latency" to a very high value like 15 seconds and "Max Idle Instances" to a very low value like 1"

As I wrote in the other thread as well this is exactly what I have done - and it has no effect.

Philip

unread,
Sep 2, 2011, 1:06:10 PM9/2/11
to Google App Engine
As an appendix: There was a benchmark performed with that
configuration.

ab -n 10000 -c 10 http://hello-world-app.appspot.com/

All the traffic went to a single instance. The instance was serving up
to 51qps.

Bay

unread,
Sep 2, 2011, 1:09:58 PM9/2/11
to google-a...@googlegroups.com
Well a real life test with my app shows that not to be the case.

Francois Masurel

unread,
Sep 2, 2011, 4:26:20 PM9/2/11
to google-a...@googlegroups.com
I can confirm Bay sayings with my own app.  That's why I've created the following issue which have been "accepted" :

Johan Euphrosine

unread,
Sep 2, 2011, 5:44:12 PM9/2/11
to google-a...@googlegroups.com
Updated the ticket :)

> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-appengine/-/a311gmfVBkcJ.
> To post to this group, send email to google-a...@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengi...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine?hl=en.
>

--
Johan Euphrosine (proppy)
Developer Programs Engineer
Google Developer Relations

Francois MASUREL

unread,
Sep 2, 2011, 5:52:22 PM9/2/11
to google-a...@googlegroups.com
How come new instances are started very frequently although I've set "Min Pending Latency" to 15s and that all my requests are under 1s?

Do we need to have an IQ of 150+ or something to understand how it really works?

Francois

Joshua Smith

unread,
Sep 2, 2011, 6:21:09 PM9/2/11
to google-a...@googlegroups.com
In my case, I found that requests coming in quick succession will spin up instances no matter what min pending is set to.

Check your logs and see if the requests that spin up new instances are very close to other requests in time.

(In my case, it was task queues that were responsible for the close requests.)

Francois Masurel

unread,
Sep 2, 2011, 6:23:17 PM9/2/11
to google-a...@googlegroups.com
In fact, for low trafic apps, I think we don't need all this idle instances machinery.

We just need one resident instance serving requests and the "Min pending latency" setting should suffice to spawn new instances when needed.

Is it possible ?

Francois Masurel

unread,
Sep 2, 2011, 6:24:42 PM9/2/11
to google-a...@googlegroups.com
Google just changed the issue 5414 status to "WorkAsIntended", so I guess we are missing something.

Johan Euphrosine

unread,
Sep 2, 2011, 7:39:12 PM9/2/11
to google-a...@googlegroups.com
I marked it as WorksAsIntented because it was involving "Always On"
(which is going to be replace by Min-Idle-Instance in the new pricing
model).

I asked you to fill a new issue with your more recent testing with
only Dynamic instances that I'm willing to escalate.

Thanks in advance.

On Sat, Sep 3, 2011 at 12:24 AM, Francois Masurel <f.ma...@gmail.com> wrote:
> Google just changed the issue 5414 status to "WorkAsIntended", so I guess we
> are missing something.
>

> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/google-appengine/-/IXIhUhSeP5sJ.

Vinuth Madinur

unread,
Sep 3, 2011, 1:37:51 AM9/3/11
to google-a...@googlegroups.com
It would be good to make task queues and deferred tasks low priority which wont spin new instances but can wait and be executed when already spawned instances become free.

James Briant

unread,
Sep 3, 2011, 2:20:56 AM9/3/11
to google-a...@googlegroups.com
Here's why GAE is (was) better than Heroku: auto scaling.

Here's how you broke it:

You instruct me to save money by telling the system that the maximum idle units should be 1. Here's a question: if I do get slashdotted, and I start needing 20 active instances (which I dont mind paying for if that happens), is "1" still the proper number of idle instances? No! So I have to log in, and up the maximum number of idle instances.

If I have to have a pager to tell me when I'm being slashdotted so I can log in to modify scaling settings, then your system offer no advantages over Heroku.


If my load is currently served by 1 instance, then having 20 instances alive is a waste of money. I have an app that in one day used 0.02 cpu-hours. Under your new system, it says it used 2.8 instance-hours. If your explanation is that its because I'm running 20 instances idle, my question is "What is wrong with your automated system that thinks I need 20 instances?"

What I Want:

I want to be able to leave the system on "Automatic". I want it to pick zero idle instances for my app that serves 14 requests per day. I want it to pick 1 idle instance for my app that has 5 instances running steady state. I want it to notice when I'm being slashdotted and start spinning up idle instances in response to the escalating traffic. YOU ARE GOOGLE. CORRELATION AND PREDICTION IS WHAT YOU DO.

Gregory D'alesandre

unread,
Sep 3, 2011, 2:43:10 AM9/3/11
to google-a...@googlegroups.com
Hi James, I think I'm misunderstanding the situation, questions for clarification are below:

On Fri, Sep 2, 2011 at 11:20 PM, James Briant <jamie...@gmail.com> wrote:
Here's why GAE is (was) better than Heroku: auto scaling.

Here's how you broke it:

You instruct me to save money by telling the system that the maximum idle units should be 1. Here's a question: if I do get slashdotted, and I start needing 20 active instances (which I dont mind paying for if that happens), is "1" still the proper number of idle instances? No! So I have to log in, and up the maximum number of idle instances.

If you get slashdotted, 1 will still work but it will mean slightly higher latency in serving some of the requests as new instances are spun up.
 
If I have to have a pager to tell me when I'm being slashdotted so I can log in to modify scaling settings, then your system offer no advantages over Heroku.


If my load is currently served by 1 instance, then having 20 instances alive is a waste of money. I have an app that in one day used 0.02 cpu-hours. Under your new system, it says it used 2.8 instance-hours. If your explanation is that its because I'm running 20 instances idle, my question is "What is wrong with your automated system that thinks I need 20 instances?"

If it says it used 2.8 instance-hours, I'm not sure how that translates to 20 instances.  You also get 24 instance hours per day for free, so it sounds like you should still be able to run for free although I might be misunderstanding the situation.
 
What I Want:

I want to be able to leave the system on "Automatic". I want it to pick zero idle instances for my app that serves 14 requests per day. I want it to pick 1 idle instance for my app that has 5 instances running steady state. I want it to notice when I'm being slashdotted and start spinning up idle instances in response to the escalating traffic. YOU ARE GOOGLE. CORRELATION AND PREDICTION IS WHAT YOU DO.

I believe we are doing what you'd like us to do, you can leave the system on Automatic and we'll leave no idle instances up for your app that serves 14 requests per day and then choose what seems appropriate for an app that is consistently running 5 instances (I suspect it would be 1 or 2).  Is this not what you are seeing?

I can completely understand that this is what you want as this is what we would like to provide, with more information I might be able to clear up the confusion.

Greg
 

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/NUoyckUf8tYJ.

Francois Masurel

unread,
Sep 3, 2011, 4:13:11 AM9/3/11
to google-a...@googlegroups.com
New related issues :

"Min Pending Latency" not enforced correctly : http://code.google.com/p/googleappengine/issues/detail?id=5765
 We need to be able to set "Max-Idle-Instance" to 0 : http://code.google.com/p/googleappengine/issues/detail?id=5764

Francois

James Briant

unread,
Sep 3, 2011, 4:20:40 AM9/3/11
to google-a...@googlegroups.com
Can you explain how my small app went from 0.02cpu hours to 2.8 instance hours?

Are you billing a full hour for any part thereof?

Are you spinning up too many instances?

Are you keeping instances alive (even though they arent showing up in my dashboard)?

What?
Reply all
Reply to author
Forward
0 new messages