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

Re: How to improve performance with MDB backend?



Saša-Stjepan Bakša wrote:
Hi,

Maybe this is not the best way to ask but I would like to get some performance
expectations or maybe suggestions how to improve performance. I do have
relatively long experience with OpenLDAP as a precompiled package and with
much less users so performance was not an issue for those installations.

Now I need to put few million users (now one million for test), custom
tailored schema and search performance is crucial but also modify performance
is big issue. Before MDB I have used HDB as backend.

What to do to improve write part of performance or performance in general
(when adding data – from time to time – OpenLDAP stalls in a way)? Just around
5 add/mod operations during that time then it continue with much higher speed.

I have used many different sources to find out other peoples experience and I
didn’t choose to write to list lightly but I really need some help/hints.

There's nothing particular to LMDB to tune. But if you're seeing pauses due to disk I/O, as your iotop output seems to indicate, you might want to look into using a different I/O scheduler.

Here's an old discussion on that topic:

http://stackoverflow.com/questions/1009577/selecting-a-linux-i-o-scheduler



As a hardware I am using two ProLiant DL360p Gen8 servers with:

48GB RAM,

HP Smart Array P420i Controller,

2 x EG0600FBDSR 558 GB hard disk in RAID 1.

2 Ethernet ports are bonded to achieve redundancy and performance and
connected to Cisco 3750 switch

OS is Ubuntu 12.04.2 LTS server with no unnecessary daemons installed. Disk is
partitioned this way.

FilesystemSizeUsed Avail Use% Mounted on

/dev/sda146G1.4G43G4% /

udev24G4.0K24G1% /dev

tmpfs9.5G240K9.5G1% /run

none5.0M05.0M0% /run/lock

none24G024G0% /run/shm

/dev/sda3232G32G189G15% /var

/dev/sda4230G2.4G216G2% /opt

OpenLDAP is latest one – 2.4.35 compiled on Ubuntu server with addition of
Berkley db 5.3.21 (I am not using it but …) and no special switches are used
during configuration except the on which puts installation to /opt/openldap
directory.

I am using also libhoard.so as a memory manager (latest one downloaded from
HOARD web site).

OpenLDAP is configured as MultiMaster N Way and I am using MDB as backend
database.

Config is in conf.d stile.

root@spr1:~# more /opt/openldap/etc/openldap/slapd.d/cn\=config.ldif

Never muck with the files inside slapd.d. Use "slapcat -n0" to look at the configuration. The slapd.d is a slapd database and its internal format is subject to change without notice. The only guarantees we make are that the slap* tools (and ldap* tools thru slapd) will work on them correctly.

In the near future we may migrate the slapd.d format to a pure binary format. (E.g., using LMDB to leverage its crash resistance.) Anyone foolish enough to have operated on these files directly, despite all our warnings, will be unable to continue to do so. Everyone who uses only the supported commands will just continue without any problem.

# AUTO-GENERATED FILE - DO NOT EDIT!! Use ldapmodify.

And top:

top - 11:56:27 up 4 days,1:43,1 user,load average: 2.71, 2.88, 3.19

Tasks: 224 total,1 running, 223 sleeping,0 stopped,0 zombie

Cpu(s):2.6%us,0.1%sy,0.0%ni, 91.3%id,6.0%wa,0.0%hi,0.0%si,0.0%st

Mem:49424228k total, 35362892k used, 14061336k free,127844k buffers

Swap: 46874876k total,0k used, 46874876k free, 32631568k cached

PID USERPRNIVIRTRESSHR S %CPU %MEMTIME+COMMAND

4833 openldap200101g30g29g S91 64.1 196:30.20 slapd

4403 root200000 D20.02:41.89 flush-8:0

1 root200 24472 2444 1360 S00.00:04.36 init

2 root200000 S00.00:00.03 kthreadd

3 root2000 00 S00.00:00.37 ksoftirqd/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/