I've been paranoid that the websocket feed I was listening to on a t3.micro
instance was being inhibited by cpu steal time from other instances under the same hypervisor.
So I switched over to a c5d.large
instance and definitely noticed less latency. But now I am curious... where did my CPU credit graph disappear to in the EC2 monitoring section?
Do c5d.large
instances not have CPU credits for some reason? If not, why not?
CPU credits only apply to T2/T3 instances. Each T2/T3 instance accumulates some CPU credits per second and also when it's in use (i.e. not "idle") it spends these CPU credits. When it runs out of credits it either slows down to the baseline performance (T2 default) or keeps running at full speed with you paying for the extra credits needed (T3 default and T2 "unlimited mode").
See On clarifying t2 and t3 working conditions? for a more detailed explanation.
Note that this doesn't apply to any other instance type - C3, C4, C5, M5, etc. None of these use CPU credits and can always use the full allocated speed.
Also note that if you upgraded from t3.micro to c5d.large you're now running a lot more powerful instance. No wonder that you see a lower latency!
Hope that explains it :)