[Date Prev][Date Next] [Chronological] [Thread] [Top]


evaristojosec@yahoo.es wrote:
> Full_Name: Evaristo Camarero
> Version: 2.4.x
> OS: Linux
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (
> 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.

I don't see this having any positive impact on slapd performance. "Heavy LDAP 
load" generally implies lots of small queries with sets of small result 
objects; very rarely do queries return large objects. When a system is under 
such heavy load, requesting larger buffers per socket will make the system 
load worse, as the kernel will have more memory consumed in these socket 
buffers and less available for other demands.

What workload have you tested this with, and what performance impact did you 
measure as a result?

> 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);
> 		}

   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/