Google Cloud Committed User Discounts - google-cloud-platform

I'm running a GCP Compute Engine instance with 4 CPUS and 15 GB of memory with a cost of, lets say for this example, USD 100/month.
If i purchase a 'Committed Use Discount' of the same spec as above, do i need to apply it to the VM or the system will automatically know where is the use discount supposed to be used?
I'm only asking because you cannot cancel these things after you make the purchase.

After you purchase a commitment, you'll set your machine specs by following these steps. As you can see, you'll choose a machine type, the quantities of vCPU and memory as it will be a new instance.

Related

Which EC2 instance size should I use if I have 100 concurrent users daily and 300 max users? I need to save cost

I have made a Business Card ordering portal and its backend is in NodeJS.
I am currently using t2.micro and I am getting like 50 daily users and 15-20 concurrent users but in some time the user count would go up to 300 daily users and 100 concurrent users. I don't want to spend much either.
It has single database and we don't use threads.
I am confused whether I should change my instance type or should use Auto Scaling Groups.
I am not a pro in AWS. Please help!!
Nobody can give you an answer to your question because every application is different.
Some applications need more CPU (eg for encoding/encrypting). Some need lots of RAM (for calculations). Some need lots of disk access (eg for file manipulation).
Only you know how your application behaves and what resources it would need.
You could either pick something and then monitor it (CPU, RAM, Disk) in production to see where the 'bottleneck' lies, or you could create a test that simulates the load of users and pushes it to breaking point to discover the bottleneck.

What is the way increasing CPU quota of VM instance in Google Compute Engine while requests were rejecting all the time?

I have a school project about parallel programming. For getting results and seeing the results are good enough, i need to increase CPU quota. I applied for increasing CPU quota in several amount -16, 24, 96- and several regions but it always rejected.
The ways that i use;
All Quotas > Select the CPUs > Select the region > Edit Quotas > Write New Quota > Send.
Edit VM instance > Select Higher CPU option > Error: Quota CPUs exceeded. Limit is 8 in region east-west-6.
Write to Sales Support Team (They haven't answered, yet.)
Write to Google Cloud Platform Support, they say; "However after careful evaluation, we have determined that we are unable to grant your quota increase due to insufficient service usage history within your preferred project. We suggest for you to make use of your current quotas and other resources readily available to serve your purposes for the meantime. To discuss further options on higher quota eligibility and to answer your questions, please reach out to your Sales team [1]" (Actually, i used this project for a while, at least for 5-6 months, not day by day, but frequently)
I have 8 CPU right now in my VM instance in Compute Engine - i was using Free Credit by the way but my credit card is added too. - I need higher quota amount. So, what is the way that i need to follow for increasing CPU quota amount after all?
Try to upgrade your free trial account to paid account. However, I checked on my account and indeed, I have quotas limitation per region (24 cpus for N1 type, 8 for other types (N2, N2D, C2))
Maybe that with a paid account, your quota increase request will be accepted! In my case, it has been accepted in 2 minutes (N2 type, request of 16 CPUs, all regions)

Increasing number of vCPUs for a single computation and billing

While studying basic ML algorithms on MNIST database, I noticed that my netbook is too week for such purpose. I started a free trial on Google Cloud and successfully set up VM instance with 1 vCPU. However, it only boosts up the performance 3x and I need much more computing power for some specific algorithms.
I want to do the following:
use 1 vCPU for setting up an algorithm
switch to plenty of vCPU to perform a single algorithm
go back to 1 vCPU
Unfortunately, I am not sure how Google will charge me for such maneuver. I am afraid that it will drain my 300$ which I have on my account. It is my very first day playing with VMs and using clouds for computing purpose so I really need a good advice from someone with experience.
Question. How to manage namber of vCPUs on Google Cloud Compute Engine to compute single expensive algorithms?
COSTS
The quick answer is that you will pay what you use, if you make use of 16 cpu for 1 hour you will pay 16 cpu for 1 hour.
In order to have a rough idea of cost I would advice you to take a look to Price Calculator and try to create your own estimation with the resources you are going to use.
Having a 1VCPU and 3.75GB of RAM machine running for one day cost around 0.80$ (if it is not a preentible instance and without any committed use discounts), a machine having 32 VCPU and 120GB of RAM on the other hand would cost around 25$/day.
Remember the rule: when it is running, you are paying it; you can change the machine type how many times you want according your needs and during the transition you would pay just the persistent disk. Therefore it could make sense to switch off the machine each time you are not using it.
Consider that you will have to pay as well networking and storage, but the costs in your use case are kind of marginal, for example 100GB of storage for one day costs $0.13.
Notice that since September 2017 Google extended per-second billing, with a one minute minimum, to Compute Engine. I believe that this is how most of the Cloud Provider works.
ADDING VCPU
When the machine is off, you can modify from the edit menu the number of VCU and the amount of memory, here you can find a step to step official guide you can follow through the process. You can change machine type as well through the command line, for example setting a custom machine type with 4 vCPUs and 1 GB of memory :
$ gcloud compute instances set-machine-type INSTANCE-NAME --machine-type custom-4-1024
As soon you are done with your computation, stop the instance and reduce the size of the machine (or leave it off).

Estimate AWS cost

The company which I work right now planning to use AWS to host a new website for a client. Their old website had roughly 75,000 sessions and 250,000 page views per year. We haven't used AWS before and I need to give a rough cost estimate to my project manager.
This new website is going to be mostly content-driven with a cms backend (probably WordPress) + a cost calculator for their services. Can anyone give me a rough idea about the cost to host such kind of a website in aws?
I have used simple monthly calculator with a single Linux t2.small 3 Year upfront which gave me around 470$.
(forgive my English)
The only way to know the cost is to know the actual services you will consume (Amazon EC2, Amazon EBS, database, etc). It is not possible to give an accurate "guess" of these requirements because it really does depend upon the application and usage patterns.
It is normally recommended that you implement the system and run it for a while before committing to Reserved Instances so that you have a chance to measure performance and test a few different instance types.
Be careful using T2 instances for production workloads. They are very powerful instances, but if the CPU Credits run out, the amount of CPU is limited.
Bottom line: Implement, measure, test. Then you'll know what is right for your needs.
Take Note
When you are new in AWS you have a 1 year free tier on a single t2.micro
Just pulled it out, looking into your requirement you may not need this
One load balancer and App server should be fine (Just use route53 to serve some static pages from s3 while upgrading or scalling )
Use of email subscription and processing of Some document can be handled with AWS Lambda, SNS and SWQ which may further reduce the cost ( you may reduce the server size and do all the hevay lifting from Lambda)
A simple webpage with 3000 request/monthly can be handled by T2 micro which is almost free for one year as mentioned above in the note
You don't have a lot of details in your question. AWS has a wide variety of services that you could be using in that scenario. To accurately estimate costs, you should gather these details:
What will the AWS storage be used for? A database, applications, file storage?
How big will the objects be? Each type of storage has different limits on individual file size, estimate your largest object size.
How long will you store these objects? This will help you determine static, persistent or container storage.
What is the total size of the storage you need? Again, different products have different limits.
How often do you need to do backup snapshots? Where will you store them?
Every cloud vendor has a detailed calculator to help you determine costs. However, to use them effectively you need to have all of these questions answered and you need to understand what each product is used for. If you would like to get a quick estimate of costs, you can use this calculator by NetApp.

AWS: Resizing a RESERVED t2.medium to a m3.large. How pricing works?

I want to hire a reserved instance in Amazon EC2 to host an application.
What really drives me the choose of it, is the RAM capacity. I know I will be running this APP for years, but I do not know how hardware requirements will be changing in the future.
So, lets say I hire a t2.medium reserved instance for a year, and in 6 month I have a boom of demand and I realize I have to migrate to a m3.large.
Do I need to give up 6 month of the already paid t2.medium instance ? Or I can just pay the difference for the 6 month between the t2.medium and the m3.large instance ?
I think flexibility is what really make AWS interesting... but I need to be able to scale up at a reasonable cost...
You don't need to give up the 6 months - you can use it for something else, or sell it right on the amazon reserved instance marketplace. If you price it right, which means slighly below what amazon charges, you can usually offload it pretty quickly. I buy a lot of 'used' instances this way because you can get the discounted reserved instance price, but get shorter terms, i.e. the 6 months in your case.
BTW: When you talk about scaling on amazon you are generally talking about scaling by adding more instances - which is your other option. If you architect it correctly, you don't have to upgrade to a large from a medium, you buy another medium (or small), or possibly even used spot instances, to fill that gap in performance.
If you upgrade from med to large, because traffic picks up, then if traffic goes back down you are stuck paying for a large when a medium would do. Consider designing your app to spread its work across a number of instances, and have that number scale up and down in response to changes in workload - that is going to end up being the best solution for you - if possible in your circumstance.
Short answer: you cant do this with a single RI and also cant do it between different instance families.
Relevant sections of the EC2 FAQ:
An RI is associated with a specific
instance family for the duration of the RI term; however, you can
change from one instance type (e.g., c3.large) to another (e.g.,
c3.xlarge) in the same family, if it is a Linux/UNIX RI.
You can consolidate multiple smaller reservations into a single larger
reservation. For example, an RI for 8 m1.smalls at $0.014/hour each
can be modified to create an RI for 4 m1.mediums at $0.028/hour each,
2 m1.larges at $0.056/hour each, or 1 m1.xlarge at $0.112/hour.
You can divide a larger reservation into multiple smaller reservations.
For example, an RI for 1 m1.xlarge at $0.112/hour can be modified to
create an RI for 2 m1.larges at $0.056/hour each, 4 m1.mediums at
$0.028/hour each, or 8 m1.smalls at $0.014/hour each.
http://aws.amazon.com/ec2/faqs/
Like E.J. Brennan says, you should scale your application horizontally by adding more instances of the same size or sell off unsused RIs on the market.