📜 ⬆️ ⬇️

Amazon added new types of instances - t2.micro, t2.small, t2.medium

New instances are cheaper than old ones and introduce the concept of CPU Credit.

CPU Credit is an internal accumulating coin that is 1 minute at 100% load.
Credit accumulates at a speed dependent on the type of server. Also, it depends on the type of server up to where its maximum CPU load will be applied in the absence of credits - the baseline. The minimum maximum. Minimum, since in the absence of credits the maximum load sags not instantly, but gradually within 15 minutes, in order to be able to compensate for the lack of resources if necessary.
Credit is kept for up to 24 hours.

Instance typeCredits per hourBaselinePrice per hourPrice per month
t2.micro6ten%$ 0.013$ 9.50
t2.small1220%$ 0.026$ 19
t2.medium2440%$ 0.052$ 38

')


Thus - t2.medium is at a very good price, with 4GB of memory on board, with the ability to work 24 minutes per hour, or 9.6 hours per day, that is, work out a full working day at maximum load. I think this is a very good suggestion.
Accordingly, the micro instance is able to work 2.4 hours per day at maximum load, and small - 4.8 hours. Check your logs, even this is not enough.
It should also be noted that 9.6 hours is based on the fact that 1vCPU is loaded at 100 percent or 2vCPU at 50 percent.
(according to baseline 20% x2 or 40% x1)
2vCPU on medium, both with 100% load can work no more than 4.8 hours a day.

Performance


For comparison, the table. it should be borne in mind that t1.micro, m1.small, m1.medium in it are calculated on the basis of annual prepayment on the basis of high load, and new instances can be improved at any time, or vice versa can be taken cheaper.

Instance typeEffective price per hourRamvCPU
t1.micro$ 0.0120.615GBone
t2.micro$ 0.0131GBone
m1.small$ 0.0241.7GBone
t2.small0.026 $2GBone
m1.medium$ 0.0483.75GBone
t2.medium0.052 $4GB2


Prices for old instances are taken from the ec2 instances marketplace today, quite recently these prices were significantly higher, so in general - the current generation is faster and cheaper if there is no round-the-clock load and there is no need for their own instance drives, new server types support only EBS.

By the way, Amazon cancels the old server types, such as: t1.micro, m1.small, m1.medium. They can still be taken on the EC2 marketplace, but in general, they are considered obsolete.

Throttling


It’s no secret that t1 was with throttling, and I actually suspect that this is where the first letter in the name of the instances comes from, but in his case the information about how exactly the maximum permissible performance will go down has not been disclosed, but now everything is clear and even with cloudwatch by metrics.

There are separate metrics for the balance of loans and their use. That, coupled with the fact that there is no longer any need to make an advance payment (upfront) for servers of this class, makes it possible to build an automatically scalable configuration that actually follows the same slogan - “Pay only for use”.

Profit


By the way, the absolute majority of servers, access to the body of which I have are invested in the limitations of the t2.medium instances, I think it’s not just me, and the commissioning of these servers is a very, very good alternative to the preceding dances with a tambourine around light / medium / heavy utilisation

Actually, not even an alternative, but an obvious winner, since for many, the calculation of “taking a year” is often not sufficiently flexible, since it is not known what is waiting there. Now it’s much easier to count in this segment.

It remains to wait that at least t3.x2large will appear, for projects where load peaks are frequent, resource-intensive, but short-lived.

Official page: docs.aws.amazon.com/AWSEC2/latest/UserGuide/t2-instances.html

Source: https://habr.com/ru/post/228495/


All Articles