For the sake of the calculator, the configuration you set in App Engine is what you are charged for, regardless of the effective usage.
For CPU (cpu parameter in app.yaml), you have set the scaling factor (target_utilization) which will determine when a new instance will spin up. That will determine the moment when you can consider that a new instance will be necessary to handle the application load. So, if you set the application to run with up to 2 cores, 2 cores will be charged, regardless of how much you make use of it. If your workload fits inside 1 CPU then you should not get any more CPUs than that to avoid spending more than necessary. The unit for the cost is core per hour, so you are charged per core that is running rather than % usage of the core being effectively used. The benefit of this format is that you are guaranteed to have at least the level of resources specified. Note that App Engine Flex is a managed Compute Engine VM, which is charged per core per minute of VM running, not by usage [1] <https://cloud.google.com/compute/all-pricing#megamem>. For memory (memory_gb), you also need to know how your application behaves in different scenarios or different memory settings. Therefore, whatever you consider appropriate and set will be charged. That said, it is a trade-off with performance and cost and you need to manually set the memory configuration so that your application has the best performance with the lowest cost you can get. For persistent disk (disk_size_gb) you can consider the same principle as in memory usage. More details about the cpu, memory_gb and disk_size_gb settings here [2] <https://cloud.google.com/appengine/docs/flexible/go/reference/app-yaml#resource-settings> . In regards to CPU, its use is averaged across all running instances and is used to decide when to reduce or increase the number of instances [3] <https://cloud.google.com/appengine/docs/flexible/python/reference/app-yaml#automatic_scaling> . However, for the sake of monitoring the application resources usage, you can use the Stackdriver Monitoring to control for example the fraction of CPU utilization for all cores on a single App Engine flexible instance (flex/instance/cpu/utilization) and the total memory used by running instances (system/memory/usage) [4] <https://cloud.google.com/monitoring/api/metrics_gcp#gcp-appengine>. On Thursday, August 29, 2019 at 12:35:57 PM UTC-4, Jasmine Sultanah wrote: > > Thanks Diogo. I have read all these links. My question is how do I find > out how many cores per hour i'm using, how much memory per hour and how > much persistent disk. the app is already running and I can see the > dashboards in AppEngine. For example in AppEngine, my memory usage is > 800MiB each minute,my instances remain at 2, CPU usage is about 5% (is this > CPU usage of combined CPU for two instances?), my write Disk bytes is 50KiB > a minute. How do I translate this information into number of cores per > hour, persistent disk and memory per hour. thanks > > On Thursday, August 29, 2019 at 1:01:29 AM UTC+1, Diogo Almeida wrote: >> >> First off, note that your app.yaml settings use a deprecated version of >> Go (1.9 >> <https://cloud.google.com/appengine/docs/standard/go/config/appref>). >> You can now use versions 1.11 >> <https://cloud.google.com/appengine/docs/standard/go111/config/appref> >> or 1.12 >> <https://cloud.google.com/appengine/docs/standard/go112/config/appref>. >> >> The documents that go over the version 1.11 and 1.12 provide more details >> about what the app.yaml settings mean. However, note that not all of the >> app.yaml settings are directly related to parameters that are used in the >> calculator. Moreover, there are some parameters in the calculator that are >> not set in the app.yaml file: region for instance. >> >> That said, note that resources are billed on a per-second basis with a 1 >> minute minimum usage cost, which means that if you want to estimate the >> cost, you need to estimate how much of the resources your app will need to >> use and set it up accordingly. The cost for cores and memory per hour as >> well as persistent disk is explained here >> <https://cloud.google.com/appengine/pricing#flexible-environment-instances> >> . >> >> If you have any other questions about the calculator parameter I suggest >> you take a look at the document links provided in calculator (the ? button >> of each parameter). >> >> On Wednesday, August 28, 2019 at 12:31:57 PM UTC-4, Jasmine Sultanah >> wrote: >> >>> I am using this calculator >>> >>> >>> https://cloud.google.com/products/calculator/#id=ce96468c-3b00-4dd6-920b-e838ab805265 >>> >>> I have a version running with these spec >>> >>> runtime: go >>> api_version: go1 >>> env: flexible >>> threadsafe: true >>> handlers: >>> - url: .* >>> script: _go_app >>> secure: always >>> redirect_http_response_code: '301' >>> automatic_scaling: >>> cool_down_period: 120s >>> min_num_instances: 2 >>> max_num_instances: 20 >>> cpu_utilization: >>> target_utilization: 0.5 >>> network: {} >>> >>> How do I find out all the parameters to put into the appengine >>> calculator? >>> my Location is london, environment is flexible. but where do i find >>> Cores per hour, memory per hour and persistent disk? >>> >>> Thanks >>> >> -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/6ced40b9-a936-4eaa-9d06-45f9eb4bae60%40googlegroups.com.
