If you work with Google Cloud Platform you may have noticed an instance type called E2. You may be wondering what the difference is with the N1 and how it can help you save, so in this post I will talk about it.

Pros and cons: E2 vs N1

The first thing we must know to be able to choose between one type and another, are the pros and cons of each one. Obviously, to be fair we will compare similar instances. These would be the pros and cons of using E2 instances.

+ Pros

  • E2 instances have approximately 7% more RAM. While an instance of type n1-standard-4 has 15gb of RAM, e2-standard-4 has 16gb. This happens with all instances sizes.
  • The cost for non-continuous use or for reserving it is lower. If your instance is not running continuously or you reserve it, you can save up to 30%.

– Cons

  • They are instances that use older CPU platforms, which may be slightly less powerful.
  • It does not allow you to select the platform, so it will use the one available. As a rule, it uses Haswell, which is the default platform of the N1, so it is likely that you will have an equivalent.

How to save with them

I suppose you have come to this article looking for how to save with them, so you will be wishing it would go with it. In this section we will compare the three types of use and the differences in prices.

Non-continuous use

If you use your instance in a non-continuous way, not keeping it 100% of the time running, you will have noticed that you do not enjoy the 30% discount that Google provides you for it, which depends on the time of use. To compensate for this we can use instances of the E2 type, which are precisely 30% cheaper.

Suppose you have a development environment, which you use about 8 hours a day (say 10 hours), and Monday through Friday. Instances of type n1 will offer you a 3% discount with such use, so if we take into account that instances of type E2 cost 30% less, the difference is 27% (which is interesting). An instance of type n1-standard-2 would cost you $19.98, compared to $14.56 for E2.

Uso continuo

If the use of your instance is continuous, but you have no interest in reserving it for a year because, for example, it is a temporary project, then you are not interested in changing to E2 instances. By continuously using n1 instances, Google gives you a 30% discount, so the instances start to cost the same as the E2 type (the difference is pennies). Taking into account that with the N1 type you can choose more modern platforms, you could gain a little extra power for the same price.

Commited use

If you have a more or less fixed use of number of instances, working 100% of the time, and your project will last more than a year, it is very likely that you have made a commitment to save a little more than 30% that offers Google by default. While this is a good way to save money, I will tell you that with E2 you can save even more.

When you reserve the instances, Google offers you a discount that is slightly higher than continuous usage but in exchange eliminates this discount, and this makes the difference not so noticeable. For example, an n1-standard-2 without reserve costs $48.54, and reserving it $43.69. This would be equivalent to a discount of 10% on the price for continuous usage of said instance (7% of the total price), which added to 30% of continuous usage discount, gives a total of 37% less.

If we compare it with those of type E2 we will realize that the reservation of said instance will provide us with a 27% discount. This is less than the 40% offered by the n1, but it must be taken into account that they cost 30% less. Adding both discounts we will get a real discount of 55% compared to the price without discounts of the N1 type, which is already more than the discount from before.

This means that while a reserved n1-standard-2 instance can cost us $43.69 a month, an e2-standard-2 instance will cost us only $30.82 a month.

For a better view of what I’m telling you, you can always use the Google calculator to calculate how much it would cost you:

https://cloud.google.com/products/calculator

Greetings, and I hope that at least it helps you save some money, which never hurts.

Daniel Carrasco

DevOps with several years of experience, and cloud architect with experience in Google Cloud Platform and Amazon Web Services. In his spare time experimenting with Arduino and electronics.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.