Hi Waldemar,

On Oct 25, 2:57 am, Waldemar Kornewald <[EMAIL PROTECTED]> wrote:
> Hi Jeff,
>
> On 25 Okt., 00:40, Jeff S <[EMAIL PROTECTED]> wrote:
>
> > The average CPU per request numbers on the dashboard are composed of
> > CPU used in executing your code (runtime) and API calls (datastore,
> > urlfetch, image API, etc). When these numbers are high it can indicate
> > that app resource usage may be inefficient in some areas, so it pays
> > to track down the cause.
>
> The runtime code is definitely not our problem. It's the datastore
> (put() in particular). Could SearchableModel cause high-CPU warnings
> because it requires a lot of index entries? I'm a little bit confused
> about how quickly index entries consume my CPU and whether my app will
> get shut down because of this. For example, if there are 50 entries in
> the list then could that add up to something like 10000mcycles?

Since SearchableModel is implemented using a list containing the words
(within certain bounds and limitations) in the entity, it is possible
that your app has some exploding indicies,
http://code.google.com/appengine/docs/datastore/queriesandindexes.html#Big_Entities_and_Exploding_Indexes
especially if the queries check for multiple matches in the list.

>
> How are we supposed to work with list properties if they kill our app
> even with just a few entries? I thought that if 5000 index entries per
> entity is the limit then we can easily work with, say, 3000 index
> entries. Is that not the case? Will that change if we pay for the
> service?

List properties themselves are not necessarily expensive, the
structure of the app's queries can have a large impact on the indexes
which will need to be updated on datastore writes.

>
> If datastore write operations consume mcycles like crazy then do you
> also expect us to pay like crazy for commercial accounts, too?

I'm not sure at this point if or how exactly the datastore megacycles
will factor in to cost. But in general, apps which use more resources
will likely be more expensive.

>
> How quickly should a transaction finish in order to not cause a CPU
> warning if it only does one single get() and put()?

There isn't a solid limit in terms of time for write operations. As
you are aware, there is a time limit for your app to respond to an
HTTP request which would be a hard limit for writes. If a datastore
operation is taking too long, it may raise a Timeout error so if you
are consistently seeing these it may indicate a problem with the cost
of writing an entity in the app.

>
> If a list property has existing index entries (because the entity got
> put()) and I add a one entry to the list property will this consume
> more CPU than if the list were empty? How much (an example would be
> nice)?

When you say, if the list were empty, do you mean if the list property
was empty before you added the entry, or do you mean you are setting
the list property to be empty? When you modify a list property which
is indexed, a new member will need to be added to the index(es) and
missing members will need to be removed from the index(es). A good way
to describe it would be, the more changes are made to the list
property in a put, the more index operations will be required. If
there is no index which uses the list property, then there is no
additional overhead in terms of indexes from updating lists.

>
> Thank you.
>
> Bye,
> Waldemar Kornewald

Happy coding,

Jeff
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to