meaning of CPU core-hour

769 views
Skip to first unread message

Ken Rimey

unread,
May 29, 2008, 6:31:52 AM5/29/08
to Google App Engine
Question for Google: Will the $0.10 - $0.12 charge per "CPU core-hour"
be based on CPU usage or the wall-clock time required to process each
request? The difference is likely to be more than a factor of ten. I
ask because the current quotas for CPU cycles appear to in fact be
based on wall-clock time.

David Symonds

unread,
May 29, 2008, 7:52:30 AM5/29/08
to Google App Engine
I don't speak for the App Engine team.

I would expect it to be the former: 10 to 12 cents for occupying one
CPU core for an hour (proportional to your usage, of course).

What makes you think it's other than that?

Ken Rimey

unread,
May 29, 2008, 12:54:12 PM5/29/08
to Google App Engine
On May 29, 2:52 pm, David Symonds <dsymo...@gmail.com> wrote:
> What makes you think it's other than that?

Only general uncertainty about how the current quotas work. The
documentation is sparse, and the dashboard is buggy and limited. The
warnings logged for "high CPU requests" talk about the request using
"a high amount of CPU" even though they are clearly referring to the
total time and not CPU time.

I hope you are correct and Google plans to charge for actual CPU
usage. I wonder what exceeding the quota for free requests will mean
in practice if Google doesn't impose a per-request charge.

Ross Ridge

unread,
May 29, 2008, 4:20:42 PM5/29/08
to Google App Engine
David Symonds wrote:
> I would expect it to be the former: 10 to 12 cents for occupying one
> CPU core for an hour (proportional to your usage, of course).
>
> What makes you think it's other than that?

Pretty much everything I've heard about CPU related quotas here
suggests that they're currently using wall clock time. Time spent
blocked waiting for a datastore or URL fetch API call to complete
counts against your CPU quota.

There also seems to about 10 milliseconds per request that's counted
against your quota for processing that occurs both before and after
your own Python code is run.

Ross Ridge

David Symonds

unread,
May 31, 2008, 3:54:08 AM5/31/08
to Google App Engine
On May 30, 6:20 am, Ross Ridge <rri...@csclub.uwaterloo.ca> wrote:
> David Symonds wrote:
> > I would expect it to be the former: 10 to 12 cents for occupying one
> > CPU core for an hour (proportional to your usage, of course).
>
> > What makes you think it's other than that?
>
> Pretty much everything I've heard about CPU related quotas here
> suggests that they're currently using wall clock time. Time spent
> blocked waiting for a datastore or URL fetch API call to complete
> counts against your CPU quota.

That's what I said: occupying the CPU core, whether you're actively
using it or just blocking while waiting for a synchronous operation to
complete.

Sorry if I confused anyone with "usage"; I meant that if your usage is
half an hour, it'd be 5-6 cents, etc.


Dave.

Ross Ridge

unread,
May 31, 2008, 6:45:02 AM5/31/08
to Google App Engine
David Symonds wrote:
> I would expect it to be the former: 10 to 12 cents for occupying one
> CPU core for an hour (proportional to your usage, of course).
>
> What makes you think it's other than that?

Ross Ridge <rri...@csclub.uwaterloo.ca> wrote:
> Pretty much everything I've heard about CPU related quotas here
> suggests that they're currently using wall clock time. Time spent
> blocked waiting for a datastore or URL fetch API call to complete
> counts against your CPU quota.

David Symonds wrote:
> That's what I said: occupying the CPU core, whether you're actively
> using it or just blocking while waiting for a synchronous operation to
> complete.

A process blocked waiting for an operation to complete doesn't consume
any CPU cycles. The operating system schedules other processes to run
during that time.

Usually the CPU time of process refers only to the time spent actually
executing on CPU, and doesn't include any time spent blocked. If you
look at the CPU times given by Window's Task Manager or Linux's ps
command, you'll see that it's very normal for their to be processes
whose CPU time is only a tiny fraction of the time elapsed since they
were started. If this what Google ment by CPU time, then time spent
waiting for a datastore or URL fetch API call to complete wouldn't
count against your quota becaue your app isn't actually running on the
CPU during these times. Instead Google seems to be measuring the
amount of CPU used during a request using "wall clock" time, that is,
the actual time it takes for the request to complete, regardless of
how much of that time your app was actually using the CPU.

Ross Ridge
Reply all
Reply to author
Forward
0 new messages