[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: (ITS#6234) CONFIGURABLE TCP BUFFERS IN SLAPD FEATURE REQUEST
evaristojosec@yahoo.es wrote:
> Full_Name: Evaristo Camarero
> Version: 2.4.x
> OS: Linux
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (194.237.142.20)
>
>
>
> Hi,
>
> Working with slapd under heavy load it could be interesting to have TCP buffers
> size configurable at slapd application level instead of getting default OS
> values.
>
> Some fast modifications in daemon.c file to achieve a hardcoded value for the
> sender buffer are:
>
> int buf_size = 1572864; /* 1.5 Mb */
> rc =setsockopt ( s, SOL_SOCKET, SO_SNDBUF, (int*)&buf_size,
> sizeof(buf_size));
> if(rc==-1) {
> Debug( LDAP_DEBUG_ANY, "slapd(%ld): "
> "setsockopt(SO_SNDBUF) failed errno=%d (%s)\n",
> (long) l.sl_sd, err, sock_errstr(err) );
> } else {
> Debug( LDAP_DEBUG_ANY, "slapd(%ld): setsockopt(SO_SNDBUF) to %d\n",
> (long) l.sl_sd, buf_size, 0);
> }
Since you use Linux, you could try the kernel's tcp autotuning
capabilities described in tcp(7) (other informative links are
<http://fasterdata.es.net/TCP-tuning/linux.html>,
<http://www.kernelfaq.com/2007/11/tcp-auto-tuning.html>). Of course,
the possibility to manually enforce the size of the buffer may be useful
in some cases, so a specific configuration option may deserve consideration.
p.