Flex pricing on RAM

67 views
Skip to first unread message

Eddie Zhou

unread,
Mar 13, 2020, 6:41:48 AM3/13/20
to Google App Engine
Hi App Engine folks,

I'm trying to understand the wording in the pricing docs here:
"Billing for the memory resource includes the memory your app uses plus the memory that the runtime itself needs to run your app. This means your memory usage and costs can be higher than the maximum memory you request for your app."

And from app.yaml reference:
"RAM in GB. The requested memory for your application, which does not include the ~0.4 GB of memory that is required for the overhead of some processes. Each CPU core requires a total memory between 0.9 and 6.5 GB.  To calculate the requested memory:
memory_gb = cpu * [0.9 - 6.5] - 0.4
For the example above where you have specified 2 cores, you can request between 1.4 and 12.6 GB. The total amount of memory available to the application is set by the runtime environment as the environment variable GAE_MEMORY_MB."

Is billing based on the requested RAM, or the used RAM, which is displayed in the GCP App Engine console (see attached)?  The wording would seem to indicate the latter, which makes sense to me.  I'm just making sure because it appears that aside from the expected 0.4 GB of overhead, my applications have a loading-time spike in memory requirements, but stabilize at a much lower usage.  I'm just making sure I don't get billed for this initial maximum that I'm forced to request, multiplied by all uptime.

Thank you!

Best,
Eddie
Screen Shot 2020-03-12 at 4.29.17 PM.png

noverlyjoseph

unread,
Mar 13, 2020, 12:53:36 PM3/13/20
to Google App Engine
Yes, you're right it is the latter, "used" (including the required runtime memory), just like it is mentioned on the Billing documentation you have shared

Eddie Zhou

unread,
Mar 13, 2020, 5:43:56 PM3/13/20
to Google App Engine
Thank you!  Can you confirm that the utilization graph in GAE console is the appropriate thing to refer to in terms of the billed utilization?  I ask because that number seems different from the numbers shown in `top` when sshing into the instance and connecting to the Docker containerr (esp. when mounting a tmpfs volume).

methkal

unread,
Mar 16, 2020, 8:35:03 AM3/16/20
to Google App Engine
You can indeed use this Graph of memory utilization in terms of billing however you will an approximate sense of that billing because information there is aggregated and not an exact like in the case of “top” command.
Reply all
Reply to author
Forward
0 new messages