Number of concurrent connections possible?

Martin Radford martin at zamenhof.demon.co.uk
Mon Jan 8 21:43:06 GMT 2001


[On the maximum number of concurrent connections on a Linux/Samba box]

> If it helps, I currently have 500 concurrent connections running on one Sam=
> ba server.  I think its limited by the kernel, so about 16,000 under 2.2.x =
> and an utterly silly number under 2.4.x

You need to be careful with this.  I'm running a Samba server at work
which will serve PCs in various computing labs.  (I work at a
University.)  Because we might ultimately be looking at 600-700
concurrent connections I looked into what the maximum might be, and
found that this is one area where RedHat tweak their kernel.

RedHat:
#define NR_TASKS        2560    
#define MAX_TASKS_PER_USER          2048
#define MIN_TASKS_LEFT_FOR_ROOT      16

Pristine source:
#define NR_TASKS        512
#define MAX_TASKS_PER_USER (NR_TASKS/2)
#define MIN_TASKS_LEFT_FOR_ROOT 4

So, if you're running a large scale Samba server on Linux (and
particularly if you're running RedHat, but I don't know what other
distributions do), and you're running a 2.2.x kernel, then you *must*
check these settings if you're planning on compiling a new kernel.

For reference, these settings are stored in
/usr/src/linux/include/linux/tasks.h 

Note that there is a maximum number of processes under 2.2.x is 4092,
or 4090 you have APM (power management) configured into the kernel.

Martin
-- 
Martin Radford              |   "Only wimps use tape backup: _real_ 
martin at zamenhof.demon.co.uk | men just upload their important stuff  -o)
Registered Linux user #9257 |  on ftp and let the rest of the world  /\\
- see http://counter.li.org |       mirror it ;)"  - Linus Torvalds _\_V




More information about the samba mailing list