--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
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.
This is pretty much exactly what setting minimum idle instances does.
Requests are preferentially routed to dynamic instances rather than
resident instances.
The problem is, something in the scheduler is broken. Instead of
routing requests to the idle instance, GAE prefers to route requests
to a fresh instance, causing the user to wait while an instance warms
up. That setting is probably best described as "minimum useless
instances". Maybe somebody took the "minimum _idle_ instances" label
too literally ;-)
This is the behavior I observed a week or two ago. Hopefully it will
be fixed. Doesn't sound like it has been so far.
Jeff
My experiences have been similar to Tapir over the last month or so.
I have an app that I have been testing to try to duplicate the always
on behavior in the new setup. This app has not been updated, etc., in
that time, billing is enabled, no datastore access, or any other
services, just dynamically generated html.
First, I tried the automatic setting for idle instances, and did not
keep track, but visiting the app about once a day I noticed that many
of those requests were loading requests, taking 20-35 seconds to load,
with subsequent requests performing fine.
Next, I tried setting idle instances to 1, and visiting about once a
day, 7 out of 10 initial requests to the app were loading requests,
with subsequent requests performing fine.
Finally, I tried setting idle instances to 2, and visiting about once
a day, only 3 out of 9 initial requests were loading requests. So,
better with 2, but still not what I would consider acceptable.
If this is the expected behavior, I would suggest that it probably shouldn't be.
- Mark
- I1 is warm and ready
- the request comes in
- the request goes to I2 and blocks while it starts up
- another request comes, goes to I3 and blocks while it starts up
While it's not 100%, GAE seems to route a disturbing number of
requests (say, 1 out of 10) to not-warmed-up instances. Just
clicking around the site produces large numbers of UX delays while an
instance starts. The dashboard often shows three instances. This is
in java with threadsafe-true and F1 instances and not particularly
CPU-intensive operations; my requests do a lot of data operations and
almost all have <1s latency.
This is with the setting at 1 min idle, 1 max idle. I've disabled
billing on my sandbox app so I can't experiment anymore - I'm not
willing to try this experiment on production. I was still seeing this
behavior a week ago. Switching to Auto/Auto, I almost never see more
than one instance and startup requests are nearly absent from the
logs.
I understand that min idle instances tries to keep them idle in
reserve. The problem is that the reserve doesn't seem to get used. I
can't think of any rationale for routing a user request to an instance
startup while there is idle capacity just sitting by. Or even if it
isn't idle that second, it will be in short order - waiting 1s is
better than waiting 20s for a whole instance.
Jeff
On Thu, Mar 15, 2012 at 3:54 AM, Gregory D'alesandre <gr...@google.com> wrote:
Jeff
Sure, EC2 is predictable... it takes several minutes (plural) to spin
up a VM and then your app. Remember, in EC2-land you have to wait for
the OS to boot before your web application can start loading.
No thanks.
20-second cold start times are annoying but not particularly terrible,
as long as users don't have to see them. I feel confident that Goog
will eventually fix whatever it is misrouting user requests to unready
instances. In the mean time, I've found that I can get very good
performance by:
* Using Auto/Auto
* Deploying new code to a new version, hitting that new version to
warm it up, then switching default versions
I'd really like to automate this second step.
Jeff
http://code.google.com/appengine/docs/java/config/appconfig.html#Using_a_load-on-startup_Servlet
Since I use this initialization I never had any failed requests from non-ready instances (this didn't change the scheduler behavior though, but at least the warmup errors are gone now)
Marcel