Actually, that is normal behavior. This has been discussed in previous
threads.
GAE seems to aggressively purge it's app cache, average app lifetime
appears to be under 2 seconds. Appengine-patch may be marginally
faster but both require Django1.x to be imported via zipimport, which
is pretty expensive.
Our app also exhibits this problem due to fairly low traffic, but
there's not much that can be done as far as I can tell. Our app's
dynamic pages contain lots of images also served via GAE, and since
the browser can make many requests at once to load these, the app can
be started up on several sever instances (probably due to load
balancing) to deliver all the images. This can add up to a huge amount
of CPU usage for just one page.
Basically, the more traffic your app gets the faster it will be.
Some people have suggested using a process somewhere to automatically
make requests once per second or so to keep apps in the cache. But
this is surely frowned upon by Google.

On Mar 10, 11:44 am, peterk <peter.ke...@gmail.com> wrote:
> That sounds like very strange behaviour.
>
> I don't have much experience with django helper..I remember using it
> before switching to appengine patch, but I don't remember having these
> kinds of issues with it. I wasn't really looking out for them though,
> mind you.
>
> The only reassurance I can provide is that it definitely shouldn't be
> that way, that's not normal behaviour..so likely someone will be able
> to help you sort out what's causing this. I can recommend app-engine-
> patch as an alternative if you feel like comparing though. It's
> available here:
>
> http://code.google.com/p/app-engine-patch/
>
> On Mar 10, 6:34 pm, Jason C <jason.a.coll...@gmail.com> wrote:
>
> > As of right now, we are seeing instance start-ups around every 2-3
> > seconds - every 2-4 requests.
>
> > We are usinghttp://code.google.com/p/google-app-engine-django/asthe
> > shim.
>
> > j
>
> > On Mar 10, 12:23 pm, peterk <peter.ke...@gmail.com> wrote:
>
> > > How frequently are you hitting appengine 'cold', requiring a start-up?
>
> > > I'm running an app on django using app-engine-patch. Just testing and
> > > so forth, it averages around 1 request every 5 to 10 seconds. Just
> > > looking over my last 60 requests or so, I don't see any evidence of
> > > 'cold starts', all requests are within the range I'd be expecting
> > > (100-300ms in my case).
>
> > > Your start-up cost in any case sounds very high..are you using app-
> > > engine-patch, or how are you using django?
>
> > > On Mar 10, 5:22 pm, Jason C <jason.a.coll...@gmail.com> wrote:
>
> > > > We have a new application that receives _very_ little load. So little,
> > > > in fact, that each request spins up a new application instance. We are
> > > > using Django trunk and the import overhead is high. All of this yields
> > > > a long request (e.g., 8802ms) using a lot of CPU (e.g., 3247ms-cpu).
>
> > > > With very little load, it makes sense that instances are recycled. On
> > > > that assumption, we've started applying some primer load against a
> > > > couple of uris in an attempt to keep some instances hot. We're
> > > > applying around 1 request/second across 2 uris.
>
> > > > When we hit a hot instance, we get blazing speed (e.g., url_1: 73ms
> > > > 91ms-cpu, url_2: 368ms 615ms-cpu - these values are pulled from the
> > > > App Engine console Logs tool and I'm not completely sure if this
> > > > represents Runtime, or combined Runtime/API - I believe the latter).
>
> > > > Under this 1 request/second load, we are still seeing lots of instance
> > > > startup - even after 40-50 minutes of sustained load. Subjectively,
> > > > the instance startups seem to come in bursts, though we've done no
> > > > formal analysis around this.
>
> > > > Does anyone else see this behavior? It _really_ kills our application
> > > > performance - so much so, that we're considering moving away from
> > > > Django in an effort to minimize the start-up pain.
>
> > > > Any info or war stories would be appreciated.
--~--~---------~--~----~------------~-------~--~----~
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-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to