Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

How do I know the maximum number of connections allowed to my Ubuntu server?

share|improve this question
add comment

2 Answers

up vote 4 down vote accepted

The maximum value is dynamic, depending on what system limitation you hit first. For example, maximum number of open files per process, multiplied by the number of processes that fit in ram+swap. That's just one possible limit.

share|improve this answer
add comment

From a network perspective there are 2^16 or 65535 socket ports, on which 2^16 or 65535 unique clients could connect. So that means if nothing else was a limitation (hah) that from a TCP only perspective you could have up to 2^32 or 4294836225 unique connections.

Good luck with that. :)

Your question perhaps hints more about how you deal with lots of TCP connections on a host.

This is classically called the C10k problem. (10,000+ connections used to be a good water mark for when things fall apart.)

Here's a doc explaining how you can help scale a box to many thousands of connections.

http://www.kegel.com/c10k.html

It's a little dated, but my experience is that most Linux apps use epoll to help mitigate.

Cheers.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.