I have been using GCP for my small blog site for a while. It was not been charged much since the traffic is small, a couple of thousand visitors per day from the world. The GCP credit is still having more than $384 30 days before the trial day ended.

1*urMF0EgCJ7YbtK090Rdikw.png?resize=800%2C494&ssl=11*urMF0EgCJ7YbtK090Rdikw.png?resize=800%2C494&ssl=1

To better trace the charges, I decided to spin up another VM around 10PM Sep 28 2018 to track how much it will charge daily with this minimum f1-micro (1 vCPU, 0.6 GB memory) VM.

I choosed Ubuntu 16.04 (Xenial Xerus) on f1-micro. License is free for this OS. The only service enabled on this f1-micro VM is Mysql used as backend of my blog. FrontEnd is another PHP/APACHE VM hosting in another GCP account.  I have hardened the firewall rules to allow only MySQL in from a specific ip.

Based on the GCP Always Free Usage Limits, I should be able to have following services as free:

  • 1 f1-micro VM instance per month (US regions, excluding Northern Virginia).
  • 30 GB of Standard persistent disk storage per month.
  • 5 GB of snapshot storage per month.
  • 1 GB egress from North America to other destinations per month (excluding Australia and China).

1. First Two days 
Here is first 32 hours charges and checked on Sep 30 2018:


SKUProduct

Usage
Cost before Credit credit
Network Inter Zone EgressCompute Engine2.51 gibibyte$0.03-$0.03
Micro instance with burstable CPU running in AmericasCompute Engine32 hour$0.02-$0.02
Network Internet Egress from Americas to ChinaCompute Engine0 gibibyte$0.00-$0.00

Google_Cloud_Platform_Charges.png?resize=800%2C432&ssl=1Google_Cloud_Platform_Charges.png?resize=800%2C432&ssl=1

Basic there are two charges:

  • Network InterZone Charges.
  • Micro instance with burstable CPU running in Americas

 Google Cloud Platform network pricing pageingress traffic is free, while egress traffic is charged based on the source and destination of such traffic. Also both Google and AWS charge $0.01 per GB for inter-zone networking. This cost will happen even two VMs are in the same zone. My Apache2/Php front end vm is in same zone as my Mysql back end vm , which is us-east1-b. I will need to double check this one after a couple of days. 

GCP warned me instance “mysql1” is overutilised and let me consider switching to the machine type: g1-small (1 vCPU, 1.7 GB memory).

Compute_Engine_-_My_SQL_-_Google_Cloud_Platform_-_Performance_War.png?resize=800%2C265&ssl=1Compute_Engine_-_My_SQL_-_Google_Cloud_Platform_-_Performance_War.png?resize=800%2C265&ssl=1
Performance Warning

Compute_Engine_-_My_SQL_-_Google_Cloud_Platform-_Change_VM_Size.png?resize=800%2C510&ssl=1Compute_Engine_-_My_SQL_-_Google_Cloud_Platform-_Change_VM_Size.png?resize=800%2C510&ssl=1

As to bustable CPU charges, I checked the monitoring logs, it happened at the beginning when I just created the vm and imported the data. Based on Google Compute Engine Pricing page,  “f1-micro instances get 0.2 of a vCPU and are allowed to burst up to a full vCPU for short periods. g1-small instances get 0.5 of a vCPU and are allowed to burst up to a full vCPU for short periods.”

I am guessing anytime if CPU is exceeding 20% usage, this charge kicks in. Here are two diagrams for first 32 hours and first 58 hours.

CPU_Monitoring_Oct_1_2018_-_Compute_Engine_-_My_SQL_-_Google_Clou.png?resize=404%2C800&ssl=1CPU_Monitoring_Oct_1_2018_-_Compute_Engine_-_My_SQL_-_Google_Clou.png?resize=404%2C800&ssl=1 VM_Monitoring_-_Compute_Engine_-_My_SQL_-_Google_Cloud_Platform.png?resize=431%2C572&ssl=1VM_Monitoring_-_Compute_Engine_-_My_SQL_-_Google_Cloud_Platform.png?resize=431%2C572&ssl=1 

I got another $0.26 charges for last 26 hours because of burstable cpu usage.

Reports_Oct_1_2018_Billing_My_SQL_Google_Cloud_Platform.png?resize=800%2C97&ssl=1Reports_Oct_1_2018_Billing_My_SQL_Google_Cloud_Platform.png?resize=800%2C97&ssl=1

2. Oct 1 CPU Usage and Cost

There is no CPU burstable cost for Oct 1. I checked CPU, and there is only one spike which is about 25%. 
Oct_1-_Compute_Engine_-_My_SQL_-_Google_Cloud_Platform.png?resize=388%2C267&ssl=1Oct_1-_Compute_Engine_-_My_SQL_-_Google_Cloud_Platform.png?resize=388%2C267&ssl=1 Oct_1_Cost-_Reports_Billing_My_SQL_Google_Cloud_Platform.png?resize=800%2C171&ssl=1Oct_1_Cost-_Reports_Billing_My_SQL_Google_Cloud_Platform.png?resize=800%2C171&ssl=1

3. Oct 1-2 CPU Usage and Cost

ProductUsageCost Oct_2-_Compute_Engine_-_My_SQL_-_Google_Cloud_Platform.png?resize=351%2C183&ssl=1Oct_2-_Compute_Engine_-_My_SQL_-_Google_Cloud_Platform.png?resize=351%2C183&ssl=1
Network Inter Zone Egress6.47 gibibyte$0.08
Network Internet Egress from
Americas to China
0 gibibyte$0.00

4. Oct 1-3 Cost and CPU Usage

SKUProductUsageCost before credit
Oct_3_CPU-_Compute_Engine_-_My_SQL_-_Google_Cloud_Platform.png?resize=358%2C192&ssl=1Oct_3_CPU-_Compute_Engine_-_My_SQL_-_Google_Cloud_Platform.png?resize=358%2C192&ssl=1
Network Inter Zone
Egress
Compute Engine9.39 gibibyte$0.12
Network Internet
Egress from Americas to China
Compute Engine0 gibibyte$0.00

5. Oct 1-4 Cost and CPU Usage

SKUProductUsageCost before credit
Oct_4_CPU-_Compute_Engine_-_My_SQL_-_Google_Cloud_Platform.png?resize=353%2C189&ssl=1Oct_4_CPU-_Compute_Engine_-_My_SQL_-_Google_Cloud_Platform.png?resize=353%2C189&ssl=1
Network Inter Zone EgressCompute Engine11.22 gibibyte$0.15
Network Internet Egress from Americas to ChinaCompute Engine0 gibibyte$0.00

6. Oct 1-9 Cost and CPU Usage

SKUProductUsageCost before credit
Last 7 Days Last_7_Days_CPU-_Compute_Engine_-_My_SQL_-_Google_Cloud_Platform.png?resize=387%2C262&ssl=1Last_7_Days_CPU-_Compute_Engine_-_My_SQL_-_Google_Cloud_Platform.png?resize=387%2C262&ssl=1
Network Inter Zone EgressCompute Engine16.45 gibibyte$0.21
Network Internet Egress from Americas to ChinaCompute Engine5.15 gibibyte$0.00

7. Oct 1-16 Cost

SKUProductUsageCost before credit
Last 7 Days
Network Inter Zone EgressCompute Engine18.27 gibibyte$0.24
Storage PD CapacityCompute Engine0 gibibyte$0.15

References: