By using AWS re:Post, you agree to the Terms of Use

Does Linux instance have the connection limit?

0

I have a Debian Linux 10 instance running on t3a.xlarge EC2, it's an application server. Every time when the request connects reached to about 150-200, the server response is extremely slow. We don’t have such a problem when the “same Linux” was running as a physical machine that was a lot less powerful than the t3a.xlarge instance. Does the Linux instance have connection limit? if yes, how to increase the connection limit?

Also the connection is not the heavy workload, I don't think it's the AWS bandwidth issue either. thx

1 Answers
1

Short answer: No, there aren't any limits imposed on connections other than what the operating system does.

However. T-series instance work on a CPU credit system. When they aren't busy they build up credits. When they are, they draw down those credits and if the credits run out the performance level returns to a baseline which may not be enough to service your requests in a timely manner.

You can monitor your CPU credits which would be a good thing to look at in this case.

If you are running out of CPU credits three suggestions:

  1. Use a larger T-sized instance. This will cost more but it also comes with a higher baseline performance. Not a great suggestion if your performance issue happens with low frequency as you're paying for capacity you don't need.
  2. Choose Unlimited mode for your instance. If it runs out of CPU credits we will give you additional CPU credits - for a charge. This is a good option if you only see this issue occasionally but if it is happening more often then the charges may be higher.
  3. Choose a non-T series instance that doesn't rely on CPU credits. This has a higher cost but now you don't have to worry about performance changing under load.

This is all assuming that CPU is the problem in this case. It may not be. You should be looking at memory usage, disk I/O and other system metrics to determine why performance suffers when you have many requests.

EXPERT
answered 5 days ago
  • Thanks for your answer. I don't think it's the CPU credit issue, I checked in Cloudwatch showing the "CPUCreditBalance" is always 2304, the "CPUCreditUsage" was always 0.x. Far away to reach the credit limit, Any other areas should we check?
    Our source server has Intel CPU, t3a has AMD CPU, Does this make a difference? Can we change the instance type from t3a to t3? thanks!

  • Changing from t3a to t3 is unlikely to make a difference. In this case I'd recommend monitoring the processes on the instance to determine what is causing the slowdown as it accepts more connections. Is it running out of memory and swapping? Is it running out of CPU capacity? Is it overloading a database which is returning data slowly? There are many causes for servers being slow.

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