yet another pending latency question

168 views
Skip to first unread message

Peter Warren

unread,
Mar 10, 2012, 9:23:52 PM3/10/12
to Google App Engine
I'm trying to understand why app engine spawns new instances of our
app given our settings and a miniscule load of 7 requests from one
client.

Our application settings are:
min idle instances: 3
max idle instances: 3
min pending latency: 15 secs
max pending latency: automatic

We run a client-based web app that initially makes a series of
requests to our app engine instance(s). In the case I'm concerned with
there are 7 requests that all take well under 15 seconds. According to
the app engine instance logs the times are: 36ms, 207ms, 52ms, 160ms,
624ms, 1405ms, 3232ms.

There are no other requests being executed against that app; all the
response times are *well* under 15 seconds, and yet app engine spawns
3 new app instances. Why?

In fact the app engine logs show 6 requests being serviced, then 1 new
app instance spawned, then the 7th request serviced, then another 2
app instances spawned.

Our app gets very little traffic, but when a new client app is loaded
in a browser somewhere between 3 & 7 requests are sent to app engine.
I'm trying to keep app engine from launching new instances of our app
since the 3 resident instances should be more than capable of handling
our traffic volume, and spawning new instances kills the response
time.

Thanks for any tips!

Peter

Peter Warren

unread,
Mar 11, 2012, 12:50:46 AM3/11/12
to Google App Engine
Additionally I just changed the max pending latency setting to 15 secs
and still see app engine spawning new instances.

Given a min latency of 15 secs and a max latency of 15 secs, I would
think that app engine would definitely not spawn a new instance until
a request had been in the queue for 15 secs.

In my latest test I see 5 requests taking under 500 ms, then app
engine spawns a new instance, then the final 2 requests are serviced,
taking 19.5 secs each!

Jeff Schnitzer

unread,
Mar 11, 2012, 1:14:56 AM3/11/12
to google-a...@googlegroups.com
You probably aren't going to like this tip but:

I find that any deviation from Auto/Auto produces a horrible UX. I
haven't done a great deal of experimentation but all preliminary
results have been bad - lots of unnecessary instance starts, many of
which block user-facing requests. All on a nearly idle application.
At this point I have taped over those sliders like you would a
lightswitch: DO NOT TOUCH.

The behavior of the scheduler is opaque, so those sliders act as
unpredictable inputs to a chinese puzzle whose only perceptible
outputs are tortured screams from your website visitors. It's hard to
imagine a way to win at this game.

Some official transparency as to the actual behavior of the scheduler
would help out a lot.

Jeff

> --
> 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.
>

Peter Warren

unread,
Mar 12, 2012, 4:03:47 PM3/12/12
to Google App Engine
Setting latency to auto/auto does seem to help. New instances are
still spawned sporadically, but much less frequently. Thanks for the
tip!

Thomas

unread,
Mar 15, 2012, 9:18:59 PM3/15/12
to google-a...@googlegroups.com
We're facing exactly the same problems: appengine scheduler was, and unfortunately, still is a pain. Google should really get this fixed because it is a major problem for almost every app running there.
Thanks for your suggestion, we will give it a try. 

> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to google-appengine+unsubscribe@googlegroups.com.

Cesium

unread,
Mar 16, 2012, 10:58:02 AM3/16/12
to google-a...@googlegroups.com
I'm going to do this right now as well.
David

PS: You, sir, consistently make good points, well stated.
(And make green G2 fly out my nose.)

> To post to this group, send email to google-appengine@googlegroups.com.
> To unsubscribe from this group, send email to google-appengine+unsubscribe@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages