[Date Prev][Date Next]
Re: increased performance
<quote who="Aaron Anderson">
> I have a small ldap directory (~100 entries) that I use for IMAP/POP
> authentication on my mail server. I'm trying to increase performance of
> the directory and came up with the idea to place the directory
> (/var/lib/ldap/*) on to a ramdrive. My question is how would I sync
> those files on the ramdrive with a physical drive. Is there a way to
> openldap to use the ramdrive for all reads and send writes to both the
> ramdrive and a backup set of files (say /var/lib/ldap-back). On bootup
> the ramdrive would be mounted and the files from /var/lib/ldap-back
> copied to it. The reverse obviously happening on halt.
one way to do it is setup 2 ldap servers. I currently am deploying
new slaves as i find a need. I started with 1 master ldap server,
and deployed 2 slaves. I setup the slaves in round-robin DNS and told
the users to use that as their address book(not telling them what
the address of the main server was). I am working on deploying
a LDAP-enabled postfix, and I setup another slave LDAP on that mail
server as well.
You could have each ldap server bind to a specific IP or a specific
port, I do this already via an option like:
/usr/sbin/slapd -h 'ldap://192.168.50.13:3890/ ldaps://192.
then i use ipchains(linux) to do transparent proxy on port 389 and
636 to direct connections to the slapd. I use stunnel connections
between the master ldap server and the slaves.
since slaves cannot do writes(all writes are referred to the master),
you could run a slave ldap db on a ramdisk and the master on a
physical disk. I am sure there is another way to do it too, but
I think this way would be the cleanest ..
but with modern caching techniques in OSs, i find it hard to imagine
you will see any noticable improvement over hosting it off a disk.
provided you have sufficient ram & cpu. from a quick slapcat | grep dn |
wc -l I have 629 entries in my ldap database sofar, and searches and
stuff are lightning fast. the slowest ldap server i have is my master
which is a P3-600 with Ultra2 SCSI drives and 1024MB of ram. my
postfix mail server is a dual p3-550, 512MB ram, on a 2 disk raid1
array(10k rpm Ultra2 SCSI disks), running a slapcat on the entire
db(278kB) took 0.2seconds ..
my ldap setup sofar is pretty simple, not much updates, the users
cannot update any info, I am the only person that writes to the db,
and until a few days ago I hadn't done more then a few bytes of
changes in over a month.
I use the caching option:
as well as:
# Indexing options
index cn,sn,uid pres,eq,sub
index objectClass eq
i don't know if it provides any noticable improvement or not.
none of my ldap servers are ldap-only, they are all very very
much multiple tasked servers ..one of the slaves is infact my
desktop at work which just passed a year of uptime this week!