Discussion:
slapd read-only slave replica
DT Piotr Wadas
2010-05-19 21:02:57 UTC
Permalink
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.

Regards,
DT
m***@aero.polimi.it
2010-05-20 13:29:48 UTC
Permalink
Post by DT Piotr Wadas
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.
Quanah Gibson-Mount
2010-05-20 14:55:43 UTC
Permalink
Post by DT Piotr Wadas
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
Buchan Milne
2010-05-20 12:12:34 UTC
Permalink
Post by DT Piotr Wadas
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.
Post by DT Piotr Wadas
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

Loading...