EC2 serving images slow: PPS issue? Bandwith issue? Both of them?

0

So, we've inherited an infra not using the best practices from AWS, and there is a single t2.xlarge machine instance serving Images already stored in it and some backend logic. While we are creating a new Infra using S3 + Cloudfront and ASG, we have to save the day until that happens.

We're trying to understand how to remediate the issue(s), which are two fold:

  1. "Waiting for the response of the server for an image request takes 24.45 seconds"🤯, and 2) "127kb takes 13.48 seconds to be downloaded" as the following image proves:Enter image description here

For the first problem: Looking at CPU Monitor we discarded that to be the problem. It just reaches 7% of CPU at that time. So our guess is that we are being limited by request per second or pps? Inbound packets at that moment: 17K (5min resolution), outbound packets at that moment: 26K (5min resolution).
Is there any way to understand if we are being limited somehow due requests or pps? Otherwise CPU would be burning..but seems it is not the case? We couldn't find a standard limit. This is just a normal EC2 instance.

For the second problem: Looking at the Network: Input at that moment: 1.29M (5min resolution) Output at that moment: 94.4M (5 min resolution). Seems t2.xlarge has a base bandwidth of 0.75Gbps aka 93Mp/s. Pretty close to the the limit but still there? After all those 94.4 are in 5 mins not per second... Also, by the documentation, t2.xlarge seems to be a Burstable Network instance up to 1.024Gbps and uses credits for that. Where can I found a Monitor of those Network Burstable Credits? Just to check if they were depleted? We can find the CPU Credits graph but not the Network ones?

Thanks a lot!

asked a year ago200 views
1 Answer
0

Have you tried turning on Unlimited for the instance to eliminate any bursting limits?

profile pictureAWS
EXPERT
kentrad
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions