Re: slapd read-only slave replica

2010-05-21 Thread Buchan Milne
On Wednesday, 19 May 2010 22:02:57 DT Piotr Wadas wrote:
> Hello,
> 
> Does it make any sens to enable indexing of any attribute on read-only
> slave syncrepl replica?

Whether or not indexes make sense is not dependant on whether the LDAP service 
is a provider or consumer or not, but dependent on what searches the LDAP 
service serves.

For example, if a provider only provides writes and changes to consumers, but 
no searches from clients, it only makes sense to index attributes required for 
replication. If a consumer is run purely for making offline backups of the 
master (e.g. by slapcat), and serves no searches, it may also make sense to 
index only replication attributes.

> I mean, isn't it just waste of resources, or,
> actually, is not a waste a resources at all, since replica is read-only
> and does not write anything anyway?

While a replica doesn't accept any changes from clients, it will write just as 
much as it's provider does on the same dataset, or it isn't doing a good job 
of replicating.

Typically, one normally configures the environment to direct read operations to 
slaves, so typically they have a higher read/write ratio, and it makes sense 
to have more indexes on slaves (the additional write IO for maintaining 
indexes is justified).

Regards,
Buchan



Re: slapd read-only slave replica

2010-05-20 Thread Quanah Gibson-Mount
--On Wednesday, May 19, 2010 11:02 PM +0200 DT Piotr Wadas  
wrote:




Hello,

Does it make any sens to enable indexing of any attribute on read-only
slave syncrepl replica? I mean, isn't it just waste of resources, or,
actually, is not a waste a resources at all, since replica is read-only
and does not write anything anyway? This, I think, apply to any version
of  openldap.


Indexing attributes has to do with how the slave is queried.  So, it 
depends how well you want the replica to perform while it is being "read". 
If you have no clients that query the replica, then I agree, there is no 
reason to index anything on it.  I will note that syncrepl itself acts as 
an internal client, and there are some indices on the replica that help 
sync replication perform more quickly.  But how badly you want to slow your 
replica down is of course entirely up to you. :)


--Quanah

--

Quanah Gibson-Mount
Principal Software Engineer
Zimbra, Inc

Zimbra ::  the leader in open source messaging and collaboration


Re: slapd read-only slave replica

2010-05-20 Thread masarati
>
> Hello,
>
> Does it make any sens to enable indexing of any attribute on read-only
> slave syncrepl replica? I mean, isn't it just waste of resources, or,
> actually, is not a waste a resources at all, since replica is read-only
> and does not write anything anyway? This, I think, apply to any version of
> openldap.

Indexes speed up reads and slow down writes.  That's why they are
especially useful on replicas.

p.