Google Cloud offers a 12 months, $300 credit trial, and a Free Tier that isn’t time-limited. That means, you can get an instance with 1 shared vCPU/0.6GB RAM with 30GB disk storage and 5GB cloud storage, all for free. You should be able to run a small website for free, forever if Google keeps this policy. (F1-Mirco VM )
Notes: From Aug 1 2021, GCP introduced a new E2-micro VM for free tier, which has 0.25 vCPU (which burst to 2 vCPU periodically) and 1 GB of RAM. (E2-Micro)
In fact, there are always some other small charges coming based on my testing, especially from spiked cpu and egree traffic. I have been using GCP VM instance for a small 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.
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.
E2-Micro
Please check https://cloud.google.com/free/docs/gcp-free-tier#free-tier-usage-limits for more details for free tier:
- vCPU: 0.25-2 vCPU (1 shared core)
- Memory: 1GB
- Disk: standard persistent disk : 30GB
- Network traffic : Standard Network Service Tier : 200GB/mo free in every region
If you found there is a small charge for disk, here is the trick part:
You will need to chose standard persistent disk rather than Balanced persistent disk.
Change type to standard persistent disk
For network service tier:
- https://console.cloud.google.com/net-tier/tiers/details?_ga=2.82938453.294358373.1721508929-930637729.1712023792
Or at the project level:
- https://console.cloud.google.com/net-tier/tiers/details?project=jon-netsec-nginx1
Or search Network Services Tiers
In the Google Cloud console, go to the Network Service Tiers page.
Click Change tier.
Select Premium or Standard, and then click Change.
How to check cost for free tier usage
Billing - Report - Last Month - Group By SKU
F1-Micro - Outdated - Kept for history archive
- 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).
Here is first 32 hours charges and checked on Sep 30 2018:
Network Inter Zone Egress | Compute Engine | 2.51 gibibyte | $0.03 | -$0.03 | |||
Micro instance with burstable CPU running in Americas | Compute Engine | 32 hour | $0.02 | -$0.02 | |||
Network Internet Egress from Americas to China | Compute Engine | 0 gibibyte | $0.00 | -$0.00 |
Basic there are two charges:
- Network InterZone Charges.
- Micro instance with burstable CPU running in Americas
GCP warned me instance "mysql1" is overutilised and let me consider switching to the machine type: g1-small (1 vCPU, 1.7 GB memory).
Performance Warning |
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.
I got another $0.26 charges for last 26 hours because of burstable cpu usage.
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%.
3. Oct 1-2 CPU Usage and Cost
Product | Usage | Cost | |
Network Inter Zone Egress | 6.47 gibibyte | $0.08 | |
Network Internet Egress from Americas to China | 0 gibibyte | $0.00 |
4. Oct 1-3 Cost and CPU Usage
SKU | Product | Usage | Cost before credit | |
Network Inter Zone Egress | Compute Engine | 9.39 gibibyte | $0.12 | |
Network Internet Egress from Americas to China | Compute Engine | 0 gibibyte | $0.00 |
5. Oct 1-4 Cost and CPU Usage
SKU | Product | Usage | Cost before credit | |
Network Inter Zone Egress | Compute Engine | 11.22 gibibyte | $0.15 | |
Network Internet Egress from Americas to China | Compute Engine | 0 gibibyte | $0.00 |
6. Oct 1-9 Cost and CPU Usage
SKU | Product | Usage | Cost before credit | |
Network Inter Zone Egress | Compute Engine | 16.45 gibibyte | $0.21 | |
Network Internet Egress from Americas to China | Compute Engine | 5.15 gibibyte | $0.00 |
7. Oct 1-16 Cost
SKU | Product | Usage | Cost before credit | Last 7 Days |
Network Inter Zone Egress | Compute Engine | 18.27 gibibyte | $0.24 | |
Storage PD Capacity | Compute Engine | 0 gibibyte | $0.15 |
No comments:
Post a Comment