Jeff, I'm seeing a very similar pattern in my threadsafe enabled Java-HRD app which does something between 1 to 20 QPS.
I was experimenting with various idle instance settings and pending latency, and could not overcome this problem unless I allowed app engine to keep around 6 instances idle for my app (which is far too many). In my case the scheduler begins to start new instances even instance 1 is just around 1 QPS and no request (or very little) are sent to the resident instance which is just snoozing around (0.000 QPS / 0.0 ms Latency). I've also tried changing the frontend instance class from F1 to F2 to give it double-CPU power, but also this seemed to have little, if not no effect at all. As I can control where requests to my app are sent to, I was shutting down all frontend instances and experimented in moving all to dynamic backends, where the backend instance view reports each instance's CPU usage (why is CPU load not listed for frontend instances?). In this case mostly my app served out of 1 dynamic B1 backend, which did not go over 20% CPU usage. Still, the scheduler several times per hour started at least 1 or 2 additional backend instances for no reason. Since there is no way in controlling how quickly dynamic backends get shutdown (unless my app sends some keep-alive requests to them), the backend scheduler very quickly shut them down again, just so that another backend got started again during the 15-minute window one needs to additionally pay for backend shutdowns. -> IMHO app engine should make dynamic backend shutdown-times configurable. In backend mode (same instance class), my app was able to serve with either 1 or 2 instances (compared to 3 - 6 in frontend mode), however the frequent starts and stops of dynamic backends made me switch back to frontend mode, as the 15-minute window quickly accumulates costs. (I can't use permanent-backends, due to unpredictable traffic spikes which require additional instances to come up). Marcel On Friday, March 9, 2012 4:53:32 AM UTC+1, Jason Collins wrote: > > Jeff, I see very similar behaviour in pythonland - i.e., the resident > instance gets almost no traffic. I opened an Enterprise support ticket > on the topic, and I got the following response: > > "the Resident instances are kept alive by the GAE scheduler for long > periods in order to attend to new requests whenever there are no > Dynamic instances to serve them. In this way, the request does not > have to wait for the instance creation, thus, the latency of creating > the instance is avoided. > However, as soon as the new Dynamic instance is up and running, it > starts getting requests and the Resident instance turns idle again, > until the app sees more traffic than its available Dynamic instances > are able to serve." > > Frankly, I'm not totally sure when the resident instances actually get > traffic. I flipped on a resident instance just so that I could get > warmup requests back (they are only issued if you have resident > instances now), but now I have an instance floating around doing very, > very little work. > > It just seems wrong to me. > j > > > On Friday, March 9, 2012 4:53:32 AM UTC+1, Jason Collins wrote: > > Jeff, I see very similar behaviour in pythonland - i.e., the resident > instance gets almost no traffic. I opened an Enterprise support ticket > on the topic, and I got the following response: > > "the Resident instances are kept alive by the GAE scheduler for long > periods in order to attend to new requests whenever there are no > Dynamic instances to serve them. In this way, the request does not > have to wait for the instance creation, thus, the latency of creating > the instance is avoided. > However, as soon as the new Dynamic instance is up and running, it > starts getting requests and the Resident instance turns idle again, > until the app sees more traffic than its available Dynamic instances > are able to serve." > > Frankly, I'm not totally sure when the resident instances actually get > traffic. I flipped on a resident instance just so that I could get > warmup requests back (they are only issued if you have resident > instances now), but now I have an instance floating around doing very, > very little work. > > It just seems wrong to me. > j > > > -- 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/-/Uv-7dNtUB-cJ. 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.
