Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,200 --> 00:00:01,780
So let's have a look now at,
2
00:00:01,780 --> 00:00:06,221
burstable type of instances in AWS, for example, T2 or T3,
3
00:00:06,221 --> 00:00:07,560
but just a T-family overall.
4
00:00:07,560 --> 00:00:11,770
So that means that when you have a T2, T3 type of instance,
5
00:00:11,770 --> 00:00:14,163
you are using it and the instance,
6
00:00:14,163 --> 00:00:14,996
will have okay CPU performance.
7
00:00:14,996 --> 00:00:17,200
And then when the machine needs to process something,
8
00:00:17,200 --> 00:00:18,690
very, very unexpected, for example,
9
00:00:18,690 --> 00:00:21,330
that requires a lot of CPU for a spike in load,
10
00:00:21,330 --> 00:00:22,163
it can burst.
11
00:00:22,163 --> 00:00:24,170
That means that the CPU can become very good,
12
00:00:24,170 --> 00:00:26,760
and can handle this spike for you.
13
00:00:26,760 --> 00:00:28,110
So then when the machine bursts,
14
00:00:28,110 --> 00:00:31,170
it usually what's called a burst credit,
15
00:00:31,170 --> 00:00:34,620
and as your EC2 instance has its lifecycle,
16
00:00:34,620 --> 00:00:36,390
it will accumulate burst credit,
17
00:00:36,390 --> 00:00:39,648
and then when the CPU is intensely being used,
18
00:00:39,648 --> 00:00:41,290
then the burst credit will be used as well.
19
00:00:41,290 --> 00:00:42,960
So if all credits are gone,
20
00:00:42,960 --> 00:00:45,010
the CPU becomes really, really bad,
21
00:00:45,010 --> 00:00:45,843
and that means,
22
00:00:45,843 --> 00:00:47,220
that you're not using the right type of instance,
23
00:00:47,220 --> 00:00:49,870
and I will show you this in graphs right now.
24
00:00:49,870 --> 00:00:52,360
So if the machine stops bursting though,
25
00:00:52,360 --> 00:00:54,690
the CPU credits are getting backed over time,
26
00:00:54,690 --> 00:00:56,910
and you can reuse them whenever you need them.
27
00:00:56,910 --> 00:00:59,780
So, first of all, instance can be amazing to handle,
28
00:00:59,780 --> 00:01:03,130
unexpected type of traffic, and if handled correctly,
29
00:01:03,130 --> 00:01:04,870
it could be a really, really,
30
00:01:04,870 --> 00:01:07,140
lifesaver type of instance for you.
31
00:01:07,140 --> 00:01:09,540
But if you are having an instance,
32
00:01:09,540 --> 00:01:11,160
that consistently runs low credits,
33
00:01:11,160 --> 00:01:13,030
then you need to move to a different kind of instance,
34
00:01:13,030 --> 00:01:13,863
because maybe,
35
00:01:13,863 --> 00:01:16,930
you're not using the T type of family correctly.
36
00:01:16,930 --> 00:01:19,680
So if you ever looks, this is from CloudWatch monitoring,
37
00:01:19,680 --> 00:01:22,463
as we can see, as soon as the CPU,
38
00:01:23,780 --> 00:01:27,360
level will spike, then there will be a decrease,
39
00:01:27,360 --> 00:01:28,640
in the CPU credit balance.
40
00:01:28,640 --> 00:01:31,250
As you can see here, there's a spike in usage of credits,
41
00:01:31,250 --> 00:01:33,500
and that means that here the CPU credit balance,
42
00:01:33,500 --> 00:01:36,750
will go down, and then once the spike steps,
43
00:01:36,750 --> 00:01:39,109
then credits are reaccumulated,
44
00:01:39,109 --> 00:01:40,420
to go back to a different credit balance.
45
00:01:40,420 --> 00:01:41,470
Okay.
46
00:01:41,470 --> 00:01:44,280
So if we look at the credits, different type of instances,
47
00:01:44,280 --> 00:01:46,180
will earn credits at a different rate.
48
00:01:46,180 --> 00:01:48,350
And so, as we can see for a T2 micro,
49
00:01:48,350 --> 00:01:51,130
we one vCPU with a launch credit of 30,
50
00:01:51,130 --> 00:01:53,810
and then you earn six credits per hour,
51
00:01:53,810 --> 00:01:57,260
and the maximum amount of credits you can have is 144.
52
00:01:57,260 --> 00:01:59,900
And the baseline performance is 10%.
53
00:01:59,900 --> 00:02:00,733
Okay.
54
00:02:00,733 --> 00:02:02,930
So what happens when the credits are exhausted?
55
00:02:02,930 --> 00:02:05,030
So I did run a little experiment for you to see.
56
00:02:05,030 --> 00:02:07,210
So I ran the CPU's stress command,
57
00:02:07,210 --> 00:02:10,340
to peak at 100% CPU utilization on a T2 micro.
58
00:02:10,340 --> 00:02:11,460
And then we can see that,
59
00:02:11,460 --> 00:02:13,730
after all the credits are exhausted,
60
00:02:13,730 --> 00:02:16,960
then the actual measured CPU utilization will drop.
61
00:02:16,960 --> 00:02:19,010
So let's have a look, this is again from CloudWatch.
62
00:02:19,010 --> 00:02:20,550
So I did launch my instance,
63
00:02:20,550 --> 00:02:23,000
and then I ran the stress command, as you can see,
64
00:02:23,000 --> 00:02:25,477
the CPU utilization skyrocketed,
65
00:02:25,477 --> 00:02:28,404
and went all the way to 100%.
66
00:02:28,404 --> 00:02:30,328
While it did so, on the right hand side,
67
00:02:30,328 --> 00:02:32,248
we can look at the CPU credit balance.
68
00:02:32,248 --> 00:02:33,780
So it started at 30,
69
00:02:33,780 --> 00:02:36,012
which is the number of CPU credits you get,
70
00:02:36,012 --> 00:02:37,620
when you launch a T2 micro,
71
00:02:37,620 --> 00:02:40,960
and then because the CPU position was skyrocketing at 100%,
72
00:02:40,960 --> 00:02:43,460
then the credit balance was being used.
73
00:02:43,460 --> 00:02:45,530
And as we go along in time,
74
00:02:45,530 --> 00:02:48,390
the CPU current credit balance drops, drops, drops, drops,
75
00:02:48,390 --> 00:02:51,360
which allows my utilization to still peak,
76
00:02:51,360 --> 00:02:55,180
but when the CPU credit balance reached the zero,
77
00:02:55,180 --> 00:02:57,270
so when we had no more credits.
78
00:02:57,270 --> 00:02:58,140
Then as we can see,
79
00:02:58,140 --> 00:03:00,380
even though the stress command was still being run,
80
00:03:00,380 --> 00:03:03,940
the CPU utilization dropped all the way to 10%,
81
00:03:03,940 --> 00:03:05,833
which is the baseline.
82
00:03:05,833 --> 00:03:06,800
And so, as you can see now,
83
00:03:06,800 --> 00:03:08,110
there is a lower CPU utilization.
84
00:03:08,110 --> 00:03:11,770
So when there is no more credit on your CPU,
85
00:03:11,770 --> 00:03:14,890
even though you are running your instance at full capacity,
86
00:03:14,890 --> 00:03:17,700
the measured CPU utilization will be really low,
87
00:03:17,700 --> 00:03:19,260
and will not be at 100%,
88
00:03:19,260 --> 00:03:20,820
which is a behavior you should know,
89
00:03:20,820 --> 00:03:21,903
going into the exam.
90
00:03:23,810 --> 00:03:25,907
So how can we (indistinct) that?
91
00:03:25,907 --> 00:03:26,740
So we have T2 and T3 unlimited,
92
00:03:26,740 --> 00:03:28,890
which is to give you an unlimited burst credit balance.
93
00:03:28,890 --> 00:03:31,182
So this time you don't have a credit balance,
94
00:03:31,182 --> 00:03:32,430
you can just tap into it as much as you want.
95
00:03:32,430 --> 00:03:33,970
That means that you're going to pay extra money,
96
00:03:33,970 --> 00:03:35,680
if you go over the credit balance,
97
00:03:35,680 --> 00:03:38,150
but you will not lose in performance.
98
00:03:38,150 --> 00:03:40,820
And in case you have a CPU research,
99
00:03:40,820 --> 00:03:43,420
that goes over the 24 hour baseline,
100
00:03:43,420 --> 00:03:45,460
then you're going to get additional pay,
101
00:03:45,460 --> 00:03:47,580
for number of CPU per hour you're using.
102
00:03:47,580 --> 00:03:49,930
So, be careful if you have a CPU instance,
103
00:03:49,930 --> 00:03:52,810
that really, always is at 100%,
104
00:03:52,810 --> 00:03:54,500
you will not be shown that behavior,
105
00:03:54,500 --> 00:03:55,860
and you will pay a lot of money.
106
00:03:55,860 --> 00:03:56,910
Okay, so be careful,
107
00:03:56,910 --> 00:03:58,917
and manage your other CPU you have,
108
00:03:58,917 --> 00:03:59,750
health of your instances.
109
00:03:59,750 --> 00:04:01,480
So this is what I wanted to show you in this graph.
110
00:04:01,480 --> 00:04:03,510
So what we can see here,
111
00:04:03,510 --> 00:04:07,020
is that the CPU utilization right here, peaks at 100%,
112
00:04:07,020 --> 00:04:09,970
and that we're using the CPU credit usage as well,
113
00:04:09,970 --> 00:04:12,059
a lot in CloudWatch.
114
00:04:12,059 --> 00:04:14,036
Okay, five credits per hour.
115
00:04:14,036 --> 00:04:15,690
And if we look at the CPU credit balance,
116
00:04:15,690 --> 00:04:18,100
we started as zero, this is the blue line right here,
117
00:04:18,100 --> 00:04:20,050
which means that first we are tapping,
118
00:04:20,050 --> 00:04:23,210
into this 24 hour period surplus credit balance.
119
00:04:23,210 --> 00:04:24,900
So we are tapping into it,
120
00:04:24,900 --> 00:04:26,820
and then when we reach 72,
121
00:04:26,820 --> 00:04:28,560
which is how many credits we can use,
122
00:04:28,560 --> 00:04:31,273
in one hour for this type of instance,
123
00:04:31,273 --> 00:04:33,840
then what's went is to the CPU will get charged,
124
00:04:33,840 --> 00:04:35,690
and the CPU surplus credit charge,
125
00:04:35,690 --> 00:04:39,290
which is a feature of T3 unlimited or T2 unlimited,
126
00:04:39,290 --> 00:04:41,890
which is that extra CPU balance were given to you,
127
00:04:41,890 --> 00:04:43,230
and you're paying for those.
128
00:04:43,230 --> 00:04:45,680
But it still allows your CPU solution,
129
00:04:45,680 --> 00:04:47,830
to remain stable at 100%,
130
00:04:47,830 --> 00:04:50,000
and give you the performance you need.
131
00:04:50,000 --> 00:04:52,730
So, if I go and launch an instance,
132
00:04:52,730 --> 00:04:55,010
and we choose an instance in the T family,
133
00:04:55,010 --> 00:04:56,470
for example, T2 micro,
134
00:04:56,470 --> 00:04:58,730
which is a burstable type of instance,
135
00:04:58,730 --> 00:05:01,300
then you scroll down, and you find advanced details,
136
00:05:01,300 --> 00:05:02,290
and you scroll down again,
137
00:05:02,290 --> 00:05:05,130
and you're looking for credit specification.
138
00:05:05,130 --> 00:05:07,960
In here we have the option to choose the unlimited mode,
139
00:05:07,960 --> 00:05:11,449
if we wanted, to have unlimited burst credit,
140
00:05:11,449 --> 00:05:12,650
and additional charge may apply,
141
00:05:12,650 --> 00:05:15,710
or to use the standard mode, to just have standard credits.
142
00:05:15,710 --> 00:05:17,350
Okay, and if you don't select anything,
143
00:05:17,350 --> 00:05:20,200
then it will go with a default based on the logic of AWS.
144
00:05:21,170 --> 00:05:23,230
And finally, if I look at my T2 micro right now,
145
00:05:23,230 --> 00:05:24,830
and go into monitoring,
146
00:05:24,830 --> 00:05:26,820
and have a look at the credit.
147
00:05:26,820 --> 00:05:28,433
So if I scroll down in here,
148
00:05:29,590 --> 00:05:32,330
at the very bottom, I can look at CPU credit usage.
149
00:05:32,330 --> 00:05:35,820
So, how much CPU credits were being used every hour,
150
00:05:35,820 --> 00:05:37,480
as well as my CPU credit balance.
151
00:05:37,480 --> 00:05:41,210
And so if I just view this in metrics,
152
00:05:41,210 --> 00:05:44,070
to give you a larger graph in CloudWatch metrics,
153
00:05:44,070 --> 00:05:47,330
as we can see, I started at about 30 credits,
154
00:05:47,330 --> 00:05:48,163
and over time,
155
00:05:48,163 --> 00:05:50,860
because I have not been using my CPU instance a lot,
156
00:05:50,860 --> 00:05:52,690
I've been accumulating credits.
157
00:05:52,690 --> 00:05:55,400
And when I was using my CPU instance,
158
00:05:55,400 --> 00:05:56,410
and my EC2 instance,
159
00:05:56,410 --> 00:05:58,990
then some CPU credits were being consumed here as well.
160
00:05:58,990 --> 00:05:59,830
Okay.
161
00:05:59,830 --> 00:06:01,440
So that's it for this lecture.
162
00:06:01,440 --> 00:06:04,133
I hope you liked it, and I will see you in the next lecture.
13087
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.