开发者

Google App Engine - What causes cold start latency time to be high, even though my CPU usage is relatively low?

开发者 https://www.devze.com 2022-12-24 14:48 出处:网络
I\'ve optimized my code to u开发者_运维技巧se only lightweight libraries.I\'m even using the low level datastore rather than JDO.

I've optimized my code to u开发者_运维技巧se 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?


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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消