I'm afraid you are still confused. You have ignored the entire point of the "max idle instances" slider in the first place. GAE keeps idle instances around so that sudden bursts of traffic don't cause users to sit around waiting while your django/spring app spends 5+ seconds loading.
Will turning max-idle-instances down to 1 reduce your bill? Of course. But only at the expense of user experience. The second user to arrive is going to wait for five seconds. Maybe you'll get lucky and Google will actually leave your idle instances running for longer than you've decided you're willing to pay for. Or maybe they won't and your users will wonder why your site is broken and go to your competitor's site instead. If you have a lot of idle instances running, it's because you're lucky that memory pressure hasn't evicted your spares, not because you're paying for service. My point in the "unofficial faq" is that this slider does not have a single "correct" setting, and if there was, it would certainly not be 1. You're basically paying for RAM. If you have a single-threaded server, your 128 MB frontend will run one concurrent request at a time. If you have an efficient multi-threaded server, your 128 MB frontend can serve an order of magnitude more requests - possibly more depending on how I/O bound your process is. I'm not saying you shouldn't set your max-idle-instances to 1 right now. For the time being, it *might* give you great performance at a great price. I'm just saying this isn't any kind of a real solution - you won't be able to complain when your latency goes to hell. Put it this way: If your multi-threaded system has an avg concurrency of 10, setting max-idle-instance to 1 is the equivalent of setting it to 10 on a single-threaded system. If you care about your user experience, you want that number high. Jeff On Thu, Oct 13, 2011 at 1:21 AM, Emlyn <[email protected]> wrote: > np Johan. > > I was confused earlier on by posts such as > > http://blorn.com/post/10013293300/the-unofficial-google-app-engine-price-change-faq > > which focuses on multithreading to get pricing down, which I think is > just wrong. There are lots of good reasons to write multithreaded > code, but AppEngine pricing isn't really one of them. > > On 13 October 2011 18:22, Johan Euphrosine <[email protected]> wrote: >> Hi Emlyn, >> >> Thanks for sharing those articles, it is very nice that you were able >> to backup the billing formula with hard facts. >> >> As it was discussed in the groups during the pricing model change the >> billing formula under the new model will be: >> billable_instances_rate = min(active_instances_rate + >> max_idle_instances, total_instances_rate) >> >> where in the dashboard: >> - active_instances_rates is the yellow line >> - total_instances_rate is the blue line >> - max_idle_instances is the upper bound of "Idle Instances" performance >> settings >> >> If you set max_idle_instances to automatic, it's equivalent to setting >> it to a very large number making the formula essentially become: >> billable_instances_rate = total_instances_rate >> >> See the following threads where Jon McAlister commented about the >> billing formula: >> https://groups.google.com/d/msg/google-appengine/zuRXAphGnPk/UiTgTIIesL0J >> https://groups.google.com/d/msg/google-appengine/W-17IhgwrLI/05Wti7I39EUJ >> https://groups.google.com/d/msg/google-appengine/T-dJtXmOO8U/npM69XZAJFcJ >> >> On Wed, Oct 12, 2011 at 3:10 PM, Emlyn <[email protected]> wrote: >>> I've been testing this hypothesis: >>> >>> Hypothesis: Ignoring the 15 minute cost for spinning up new instances, >>> the price we pay is the moment by moment minimum of (total instances) >>> and (active instances + Max Idle Instances). If Max Idle Instances is >>> set to Automatic, then we pay for the moment by moment total >>> instances. >>> >>> It holds. That is, if you leave the default Max Idle Instances setting >>> (Automatic), you'll be billed for every bit of instance time the >>> scheduler chooses to run. If you set it to a fixed number, you'll have >>> a fixed cost cap based on the actual work you are doing (a lot more >>> like cpu time), in most cases a lot lower. >>> >>> Here are a couple of posts in detail, with graphs, billing numbers, >>> pictures! >>> >>> The Spiny Norman Test >>> http://appenginedevelopment.blogspot.com/2011/10/spiny-norman-test.html >>> >>> Go Spiny Norman, Go >>> http://appenginedevelopment.blogspot.com/2011/10/go-spiny-norman-go.html >>> >>> -- >>> Emlyn >>> >>> http://my.syyn.cc - Synchonise Google+, Facebook, WordPress and Google >>> Buzz posts, >>> comments and all. >>> http://point7.wordpress.com - My blog >>> Find me on Facebook and Buzz >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Google App Engine" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> 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 >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google App Engine" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/google-appengine?hl=en. >> >> > > > > -- > Emlyn > > http://my.syyn.cc - Synchonise Google+, Facebook, WordPress and Google > Buzz posts, > comments and all. > http://point7.wordpress.com - My blog > Find me on Facebook and Buzz > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-appengine?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
