The cpu in the equation is a 1ghz equivalent cpu which is not necessarily
the same as the cpu you request ran on.

- alkis (mobile)

On Aug 17, 2010 7:41 PM, "MyElasticEye" <[email protected]> wrote:
> Hi,
>
> I have been trying to optimize the App Engine application my team is
> working on. As I read on Google's documentation,
>
> 1 megacycles = 1/1200 cpu seconds
>
> And if I a check how many megacycles it takes to load an empty sinlge
> page without any templates using webapp.py, it takes 0 megacycles.
> However, the amount of cpu miliseconds used for the request usually
> becomes around 200 ms. That's understandable because of the overheads
> of the request.
>
> However, I see that when I do like:
>
> class SomePage(..):
> def get(self):
> start = quota.get_request_cpu_usage()
> # do some dense operations here...
> end = quota.get_request_cpu_usage()
> logging.info("the operation cost %d megacycles." % (start -
> end))
> return
>
> I can't see a relation btw the megacycles it takes and the cpu
> miliseconds used. According to the equation above, 1200 megacycles = 1
> cpu second, and if the result of the operation is 2400 megacycles, it
> means that it should equal to 2 cpu seconds. Let's say there is an
> overhead occuring even if we load an empty page or whatever, and then
> it should equal to 2400 + 200 = 2600 ms
>
> However, the logs of the request says that it takes much more than 2
> cpu secs, more like 7000 or 9000 cpu milisecs.
>
> Why is this occuring?
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
[email protected]<google-appengine%[email protected]>
.
> For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected].
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