Imagine if it took 10 seconds to load for example the Google Search
index page in your browser. It doesn't sound like a very long time,
but today that kind of load time for an index page is very poor
performance.
I understand that GAE cannot at the moment hold all applications hot/
warm, because that would require a lot more resources I assume. But I
think the cold start time needs to be brought down to a maximum of
around 2 seconds.
It actually doesn't matter in many cases if an application is used by
millions of users every day or only seldom by a few people. The load
time for webpages is usually extremely important regardless the amount
of traffic to a website. Each user's experience counts.
The cold start time has improved but now and then loading the index
page takes frustratingly long time. That's poor quality for both end
users and developers.
--
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.
I guess I could cache the html generated by Django, at least for the
index page, if that library is more heavy to load than the Memcache
API. I don't know exactly how Python works, but shouldn't it be
possible for GAE to always have the standard frameworks always loaded
into memory for all applications to share?
On Feb 21, 3:17 am, Eli Jones <eli.jo...@gmail.com> wrote:
> First, when I log into appengine.google.com, it still says "this is a
> preview release" with the "preview release" part being in bright red
> letters... so.. take that to mean what you want.
>
> Second, you haven't mentioned what exactly the code for your index page
> does? What is it loading? How much caching are you doing?
>
> Caching isn't just for entities from the datastore.. you can and should also
> cache html or page templates or whatever else you can.. Also, you shouldn't
> dump a bunch of imports at the top of your code.. only import specific
> modules as needed within the code.
>
> Though, it's hard to make suggestions without knowing exactly how your code
> works. (You may be doing all of the above things.. or feel like you are
> doing them.)
>
> A lot of the annoying restrictions that people complain about, to me, are
> inherent limitations to having a highly scalable infrastructure.. the
> restrictions are there to force you to learn to code (from the beginning)
> for the App Engine environment.
>
> Granted, your issue may just be with intermittent but slow cold start
> times.. is the cold start reasonable in general for you..
> but occasionally hits that frustrating point? (Again, hard to know anything
> without knowing how your code is structured.)
>
> > google-appengi...@googlegroups.com<google-appengine%2Bunsu...@googlegroups.com>
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
On Feb 21, 3:37 am, Eli Jones <eli.jo...@gmail.com> wrote:
> I have a testapp set up that I use to see if any goofy ideas I come up with
> have any merit.
>
> So you could try to create a simplified version of your page that used the
> same imports and django templates as the live one. Then create two
> different test pages.. one where you experiment with caching different
> things.. and then try to compare the cold start times.
>
> > <google-appengine%2Bunsu...@googlegroups.com<google-appengine%252Buns...@googlegroups.com>
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
Here is a blog post with a solution using static files:
http://blog.vikispot.com/2010/02/dynamic-homepage-with-static-html-and.html
Using entirely static html files could perhaps work. But the
generation of dynamic content would still take a long time in a cold
start. Anyway, I think the cold start time for GAE should be improved
rather than having thousands of developers having to come up with
messy workarounds.
On Feb 21, 4:15 am, Eli Jones <eli.jo...@gmail.com> wrote:
> Hmm.. only way to ever be sure is to test. I don't use Django so I am
> completely useless for suggestions.
>
> It seems that 500 ms or less should be your expected cold start time for
> python.
>
> If you are experiencing cold starts higher than that, then something in your
> code could be taking up that time.. so there might be ways to improve the
> cold start time.
>
> > > > <google-appengine%2Bunsu...@googlegroups.com<google-appengine%252Buns...@googlegroups.com>
> > <google-appengine%252Buns...@googlegroups.com<google-appengine%25252Bun...@googlegroups.com>
If you don't need to start the django stack to serve a page from cache
then you should be able to deliver a page from a warm instance in
20-40ms
and if you need to start an instance and only import memcache and
retrieve the cached page you are looking at about 200ms.
I am doing this on a number of sites (don't use django but use bfg,
but a complete cold start with nothing in cache
is typically around 8-10 seconds. And even the main page is made up
of many cachable bits) so its really rare
we ever have to deal with a full stack startup with nothing in cache.
T
Perhaps you can use profiling for detecting what is the bottleneck.
AFAIC, 10 secs cold-start is too long for any appengine/python application.
--
Takashi Matsuo
Kay's daddy
> To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
At the same time, I see that memcache is now expiring MUCH more
quickly. That's too bad, but for me, for now, that's an acceptable
tradeoff, if indeed it is a tradeoff.
On Feb 21, 6:57 am, Takashi Matsuo <matsuo.taka...@gmail.com> wrote:
> Please make sure that your app doesn't load all the views on the
> memory when your index page is accessed.
> Loading all the views in your memory at startup will cause very long
> cold startup time.
>
> Perhaps you can use profiling for detecting what is the bottleneck.
>
> AFAIC, 10 secs cold-start is too long for any appengine/python application.
>
> --
> Takashi Matsuo
> Kay's daddy
>
On Feb 21, 3:57 pm, Takashi Matsuo <matsuo.taka...@gmail.com> wrote:
> Please make sure that your app doesn't load all the views on the
> memory when your index page is accessed.
> Loading all the views in your memory at startup will cause very long
> cold startup time.
>
> Perhaps you can use profiling for detecting what is the bottleneck.
>
> AFAIC, 10 secs cold-start is too long for any appengine/python application.
>
> --
> Takashi Matsuo
> Kay's daddy
>
To load an application over the network into the memory of a server
cannot take much time, unless the application is monstrously huge. So
there must be some other kind of bottleneck involved. Maybe to hook up
an application to the datastore, memcache etc is what takes a lot of
time during a cold start?
AFAIK, it is the cold-start loading of Django that is the cause of the
delay.
And that Django can cause several seconds of extra delay doesn't sound
plausible.
No, I think this is something in the GAE infrastructure itself,
independent of Java or Python etc. Google should look into it, lest
IBM will beat them with a WebSphereCloud or something like that, or
Sun Microsystem with a JavaCloud, or Sony with a PlayStationCloud, or,
God forbid, Microsoft with a DOSCloud. ;-)
Chris
On Feb 22, 12:42 pm, Anders <i...@blabline.com> wrote:
> And that Django can cause several seconds of extra delay doesn't sound
> plausible.
In the early days of App Engine, there were complaints that django
couldn't be used because of the 1000 file limit. This is pretty much
the definition of a bloated framework.
And I _think_ the answer to your question is that the framework is
loaded 100 times. That is just a guess based on my understanding from
other posts.
Robert
It would be fun, although likely unnecessary to write my own template
code. I would then only use one template expression, such as
[[ name ]] and then do a simple, lightning-fast string replacement of
these expressions in the template. No if statements, no for loops or
anything fancy like that. :-)
On Feb 23, 5:15 am, Robert Kluin <robert.kl...@gmail.com> wrote:
> Hey Andres,
> If you are only using Django for templates, you might consider
> looking into other template systems. We have been using Mako and are
> very happy with it.
>
> And I _think_ the answer to your question is that the framework is
> loaded 100 times. That is just a guess based on my understanding from
> other posts.
>
> Robert
>
If you are just needing some simplistic substitutions you could always
look at Python string templates:
http://docs.python.org/library/string.html#template-strings. I would
probably not do anything very involved with them, but for returning a
simply status line or something similar they might be work.
Robert
I don't think it would make much difference to the cold start time,
but could improve the general performance a little bit.
On Feb 23, 6:23 am, Robert Kluin <robert.kl...@gmail.com> wrote:
> Mako is not included, but it is easy to include yourself. Just grab a
> copy (http://www.makotemplates.org/), then include the mako directory,
> from under lib, inside in the root of your app.
>
> If you are just needing some simplistic substitutions you could always
> look at Python string templates:http://docs.python.org/library/string.html#template-strings. I would
> probably not do anything very involved with them, but for returning a
> simply status line or something similar they might be work.
>
> Robert
>
On Feb 23, 6:23 am, Robert Kluin <robert.kl...@gmail.com> wrote:
> Mako is not included, but it is easy to include yourself. Just grab a
> copy (http://www.makotemplates.org/), then include the mako directory,
> from under lib, inside in the root of your app.
>
> If you are just needing some simplistic substitutions you could always
> look at Python string templates:http://docs.python.org/library/string.html#template-strings. I would
> probably not do anything very involved with them, but for returning a
> simply status line or something similar they might be work.
>
> Robert
>