Understanding instances and logs

36 views
Skip to first unread message

WallyDD

unread,
Sep 8, 2011, 1:09:51 PM9/8/11
to Google App Engine
Hello,

I have been going through the logs of one of my applications trying to
determine how best way to change it so I can minimize my billing. I
don't have a good understanding of how instances work with the Google
App Engine.

A typical log line looks something like this;
ms=33 cpu_ms=90 api_cpu_ms=43 cpm_usd=0.002837
instance=00c61b117cae71509510e6ae1e0ecc025ebb5855

Now if I apply memcache to a page it becomes something like this;
ms=27 cpu_ms=0 api_cpu_ms=0 cpm_usd=0.000374
instance=00c61b117cae71509510e6ae1e0ecc025ebb5855

The first setting "ms" is still very variable and hasn't really
dropped much on average. cpu_ms, api_cpu_ms and cpm_usd have all
dropped dramatically.

My question: is the instance effectively tied up waiting for the
entire transaction to take place (the setting "ms") or is there some
type of multitasking/multithreading taking place?
What should I be looking for in my logs to reduce my instance usage?

Thank you.

James Cooper

unread,
Sep 8, 2011, 1:35:25 PM9/8/11
to google-a...@googlegroups.com
Hi there,

My understanding is that currently Java based apps are multi-threaded, so a single instance can concurrently service multiple requests.  Python apps are single threaded, but that will change when 2.7 support is released.  I do Java work, so I'm not sure what you have to do on the Python side to support that change.

Others here should correct me if I'm wrong about this.

-- James

WallyDD

unread,
Sep 9, 2011, 12:00:13 AM9/9/11
to Google App Engine
Thanks for the answer James, your answer was pretty much what I
thought the situation was.

According to this posting;
https://plus.google.com/110401818717224273095/posts/AA3sBWG92gu
The new billing starts on Nov 1 and Python 2.7 starts on Dec 1.

For one month I am going to have to put up with paying Google more
money than I would like to. I don't mind optimizing my application (it
is easier than expected) but would have preferred Python 2.7 to be
released prior to the new billing.
Reply all
Reply to author
Forward
0 new messages