Why am I being charged for N1 Predefined Instance Ram? - google-cloud-platform

I'm new at GCP and I confess that don't undestand all of the billings.
I'm being charged twice for my instance as you can see in the following image
First for my Instance Core, okay, but later for a Instance Ram, I had made my research and discovered that this can charge me when I use custom RAM on my instance
In this following print, it says me how to find out if I'm using more vCPUs than the pre-defined options
As you can see I'm only using 1 reserved vCPU
That is the pre-defined options of n1-standard-1
Is this charge correct? If so, is there a way to prevent it using n1-standard-1? How?

I am following up regarding your concern about how your instances are being charged. You can verify pricing for Predefined vCPUs and memory. This is the actual price of the service and is more reliable compared to the Pricing Calculator which only gives you an estimate.
The VM instances charge pricing is in this link. It shows the cost for N1’s machine standard predefined machine types. The vCPUs and memory from each of the machine types are billed by their individual predefined vCPU and memory prices.
I suggest that you check the complete pricing matrix for all of our services so you'll have an idea of how much the actual charges will be for your projects and you can choose different instance types or memory from pre-defined n1-standard-1.
If you are interested in discounts, this document explain 3 type of discounts: Sustained use discounts, Committed use discounts, Discounts for preemptible VM instances
Also the Google Cloud Free Tier gives you free resources to learn about Google Cloud services by trying them on your own.

Related

Google cloud compute engine always free tier

I am trying to run a compute engine instance using the always free tier option. The documentation of the free tier says if it is a computer engine instance of e2-micro from certain locations, it should be free. Here is the screenshot:
Now, I have chosen e2-micro with standard persistent disk of 10GB (one can not go below 10GB in GCP platform) at us-central1 location (which is one of the free tier location). It still shows an estimate of $6.51 monthly cost. Here is the screenshot of the instance configuration:
Am I doing something wrong here? Is there any other option I need to check to make sure it stays in the always free tier?
An e2-micro instance is not (in and of itself) free. I think the estimate you are seeing is in fact the cost of running an instance. What makes it "free" is that Google will "waive" the fees for the resources described as "free tier". However, if you run more and more e2-micro instances beyond the amount offered as a "free taster" then you will be charged the rate listed.
Looking in detail at the first image that Syed posted we see the following at the bottom:
Your Free Tier e2-micro instance limit is by time, not by instance. Each month, eligible use of all of your e2-micro instance is free until you have used a number of hours equal to the total hours in the current month.
Putting it another way, you get this amount of resource for free. For example, if we assume that a month is approximately 720 hours then that is the amount of e2-micro consumption you get free in monthly billing cycle. Whether you run 1 instance of CPU consumption for the whole month or 720 instances for only 1 hour. Take care to note that resources are broken down into their chargeable components (CPU, disk, network egress).
Disclaimer: Nothing in this post should be taken as a formal Google statement ... please consult Google documentation such as Google Cloud Free Program for accurate details.

GCP GCE F1-micro not free?

I am trying to create a GCE f1-micro in GCP. It should be free according to: GCP Free Tier
and following the tutorial: How to set up a free micro VPS on Google Cloud Platform
However it does not seem to be free. The pricing calculator set beside is showing the message:
$4.28 monthly estimate
What I am missing? thanks
It's f1-micro is always free up to 720 hours (1 month) in the supported regions. GCP still shows you the cost per hour, because GCP doesn't yet know how many hours you're going to use. If you use more than 720 hours, it will begin charging you at that rate.
Your Always Free f1-micro instance limit is by time, not by instance. Each month, eligible use of all of your f1-micro instances is free until you have used a number of hours equal to the total hours in the current month.
Sicne this was answered, the free instance type is now an e2-micro, not an f1-micro, but this answer should otherwise still hold.
A single free tier qualified (e.g. e2-micro) instance, running for an entire month, given certain constraints, should be free, yes.
2 things might be at play here for your estimate:
When using the pricing calculator, to ensure the free tier limits are accounted for, make sure you check the "Include Always Free usage in my estimate" box (note that this checkbox only appears if you have selected a valid "always free" configuration):
The GCP pricing calculator does not automatically include disk in the estimate, but it would also account for the free tier for disk usage in a similar way, when it is added to the estimate.
That said, you appear to be referring to the estimate that shows up on the "Create an instance" page. This estimate does not account for the free tier, and additionally includes the cost the persistent disk that you have requested (also without accounting for the free tier). However, if you see the message "Your first 720 hours of f1-micro instance usage are free this month." above that estimate, the instance (but possibly not including the disk if it is, for example, larger than 30GB) should qualify for the free tier (subject to your other usage, of course).
Second, the always free tier for an f1-micro is only in one of three US regions: us-west1, us-central1, or us-east1. Make sure you have selected one of those regions.

Using Google Container Engine with GCP free tier

Is it possible to use Google Container Engine with Google Cloud free tier?
(I mean the "Always Free" usage limit, not the $300 free credit)
The docs for GKE says:
The basic cluster is free but each node is charged at standard Compute
Engine pricing
But the Compute Engine also have a free instance. Is it possible to use them together?
Unfortuniately, this is no longer a correct answer, as GKE no longer (as of December 2020 if not earlier) supports f1-micro instances for node pools as they do not have sufficient memory (as alluded to in my original answer below where enabling stackdrier would make the cluster unstable). Therefore, it is not possible to run a GKE cluster fully within the free tier.
Previously, this was possible. See explanation below.
Yes, you can use GKE with the free tier. GKE only charges for the underlying compute engine resources, which are directly billed by compute engine. (Note that after June 6, 2020, the free tier only includes one free GKE zonal cluster -- not an unlimited number of clusters).
GKE will likely require you to run 3 free f1-micro instances concurrently to get the cluster to a minimum size, but as long as the cluster is in one of the free regions and the total usage in a month is under the total number of hours per month it will still be free (that is, you can run 3 f1-micros for a bit under 250 hours and still be in the free tier). Make sure to shut off your instances when you are not using them. See more at https://cloud.google.com/free/docs/gcp-free-tier#always-free-usage-limits (especially the notes about the limit being time rather than instance count).
You may also want to ensure that the persistant disks are not kept around while the cluster isn't running, as the free tier only allows 3 10GB disks over the course of the month.
If you happen to run over the usage, you will only be charged for the usage beyond the free tier.
Of course, this all assumes that f1-micro instances are suitable to your use case. They are quite limited, and once GKE is on them, they have almost nothing remaining in terms of RAM: https://cloud.google.com/kubernetes-engine/docs/concepts/cluster-architecture#memory_cpu
Finally, it has been my experience that setting up the stackdriver support when you create the cluster if you only have micro instances can cause the cluster to struggle greatly -- the stackdriver monitoring alone (or with even minimal other applications) start to cause the nodes to be throttled and time out.
For now It's not possible to create kubernates cluster with one f1-micro. It requires minimum 3 f1-micro instances:
ERROR: (gcloud.container.clusters.create) ResponseError: code=400,
message=Clusters of f1-micro instances must contain at least 3 nodes.
Please make the cluster larger or use a different machine type
This is how I made mine. I created a cluster named 'free-cluster' which runs 2 nodes. These nodes are in 'us-west1-a' as the 'free' tier only allows for the us-east, us-west and us-central zones only. also the VM instance-type should only use 'f1-micro' as that is the freebie they give. the rest are paid.
As is pointed out, GCP does force us to create 3 nodes and no option to state this in the dashboard. But after that you can just go to the nodes and "cordon" and "drain" them so they will not consume the free compute fast. You can leave just one node for the free-tier... this however makes less sense as you will not take advantage of load balancing, self-healing and other features as to why we use kubernetes clusters to begin with. for me I am good testing on 2 nodes as I only need to pay for that 1 cheap monthly f1-micro for my hobby and learning. make sure to go to Google Compute Engine in the dashboard and open the 'Instance groups' in the sidebar, you will find the VM instances in that cluster which you can just delete by selecting and clicking the "Delete Instance" button.
There is no way to get a free GKE cluster on GCP, but you can get a very cheap one by following the instructions at https://github.com/Neutrollized/free-tier-gke.
Using a combination of GKE's free management tier and a low cost machine type, the cost estimate is less than $5 per month: .
More details on what is available as part of the free tier can be found here: https://cloud.google.com/free.
tl;dr
gcloud container clusters create cheap-cluster \
--zone us-west1-a \
--node-locations us-west1-a \
--machine-type=e2-small \
--max-nodes=1 \
--num-nodes=1
As I understand, Google allows 1 f1-micro instance to be used for free even after the 12 month free period.

Pricing and operation concerns for Amazon EC2

My knowledge regarding servers is limited and I'm trying to figure learn more. I'm currently looking into EC2 and I have a question regarding their 'hours of runtime' for a single instance.
Say I go with an m1.medium instance which is $0.120 per hour. Is there any kind of underlying meaning to that? Or is it literally, if my server is working on something 24/7 for a month (31 days) that I'll be billed at $89.28 (24 * .120 * 31)? If I have an unusually high period of activity I don't want to receive a $1000 bill because I didn't fully understand the server pricing.
Also, would 2 m1.small instances perform about the same as 1 m1.medium instance, or is the relationship not entirely linear?
Thanks
Those $89.28 are indeed money billed for a month of ec2.medium instance usage. But you also should be aware of
DataTransfer costs (for example, if you host a web application, amout of data served to your end users is billed)
Storage price, as your instance should have some storage, same applies for backups (for example in form of snapshots, they are billed for space used)
You also might be billed for other services (such as EMR), but just in case you use them, so no need to worry right from the start.
Refer to EC2 price or price calculator
If you worry about unexpected bills, set up a billing alert. You'll be notified if your bill exceeds your expectations.
As for performance, 2 m1.small is roughly equal to m1.medium only in terms of CPU, but performance often depends on IO, architecture (32b vs 64b) and other factors. I had a use case when t1.micro instance outperformed m1.medium.

Running Map Reduce on a data set of around 10 GB on AWS

I want to store around 10 GB of data on AWS services and use map reduce to process the data.
Is using EC2 the best option ? I want to use free tier service, it says maximum of 613 MB for free services on EC2 and that does not satisfy my requirement. I am doing a hobby project and my expenses are limited.
The free tier FAQ also talks about using AWS EBS with free 30 GB of data. Can I use Map Reduce services on EBS too, since AFAIK EMR is only available on EC2 ?
Does anyone know of any other alternatives that I can use for the same ?
Try the AWS Simply Monthly Calculator, located at http://calculator.s3.amazonaws.com/calc5.html#s=EMR, to get a feel for how much your project will cost using AWS.
The recommended workflow for EMR is to store data in an S3 bucket. So in the calculator, click S3 on the left. In the form enter 10G. The price for S3 storage is about $0.10 per gb/mo, so 10G costs about $1.00/mo.
Then, click on Amazon Elastic Map Reduce on the left. The form allows you to select predicted number of instances, hours/week or hours/mo expected usage, and expected instance type needed for your project. For example, for a project that requires 20 hrs/week using 1 Small EC2 is estimated to cost around $6.00. Micro instances do not seem to be offered with EMR.
Therefore, if you think you can get by with a Small Instance, and you plan to use it infrequently, your expenses might be under $10 per mo.
To reduce expenses even further, you could use spot instances rather than standard instances, as explained here: http://aws.amazon.com/ec2/spot-instances/#7.