views:

185

answers:

2

I've optimized my code to use only lightweight libraries. I'm even using the low level datastore rather than JDO.

And my cold start CPU usage has dropped from about 5 seconds to about 1.5 seconds. However, the time it takes to respond is often about 4.5 seconds, though it varies a lot.

Here are some lines from my logs:

  • 03-19 09:16PM 57.368 /donothing 200 4506ms 1516cpu_ms 0kb Mozilla/5.0
  • 03-19 09:22PM 54.884 /donothing 200 4452ms 1477cpu_ms 0kb Mozilla/5.0
  • 03-19 09:35PM 47.605 /donothing 200 4773ms 1633cpu_ms 0kb Mozilla/5.0
  • 03-19 10:23PM 25.637 /donothing 200 2731ms 1477cpu_ms 0kb Mozilla/5.0

What is the app engine doing for those extra 3 seconds that apparently isn't using any CPU?

+1  A: 

Probably there are fewer network interactions to fetch support classes from Google.

Stephen C
I'm wondering though what does it have to do for those extra 3 seconds. Hopefully those extra 3 seconds of not using CPU aren't necessary and I can get my cold start down to about 1600ms.
Kyle
@Spines ummm ... wait for the classes to arrive from Google?
Stephen C
+1  A: 

You seem to have already done a lot to improve your application's cold start time... I really don't think there's anything else that you can do. Keep in mind though, that this is a known problem and the GAE team seems to be working on cutting this down as much as they can. You'll probably see start time improve without any more work on your part.

EDIT: It turns out precompilation is now on by default. That should also give you a boost.

Sudhir Jonathan
Romain Hippeau