Re-index performance - default tdb sizes.

Gary Lockyer gary at catalyst.net.nz
Tue Mar 19 23:08:19 UTC 2019


With the expectation that it would make no difference I changed the size
the in memory tdb used by re-indexing from 1000 to 100,000 and ran it
against a 100,000 user domain.  Times went from 16 minutes 30 seconds to
44 seconds.

This does suggest that we should look at the default sizes we use to
create our tdb databases with especially on larger domains.


diff is from my working tree, so line numbers may not line up with master.

diff --git a/lib/ldb/ldb_key_value/ldb_kv_index.c
b/lib/ldb/ldb_key_value/ldb_kv_index.c
index c80d94b2560..ee981d718e1 100644
--- a/lib/ldb/ldb_key_value/ldb_kv_index.c
+++ b/lib/ldb/ldb_key_value/ldb_kv_index.c
@@ -736,7 +736,7 @@ static int ldb_kv_dn_list_store(struct ldb_module
*module,

        if (ldb_kv->idxptr->itdb == NULL) {
                ldb_kv->idxptr->itdb =
-                   tdb_open(NULL, 1000, TDB_INTERNAL, O_RDWR, 0);
+                   tdb_open(NULL, 100000, TDB_INTERNAL, O_RDWR, 0);
                if (ldb_kv->idxptr->itdb == NULL) {
                        return LDB_ERR_OPERATIONS_ERROR;
                }


Ngā mihi
Gary

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20190320/6b0138f6/signature.sig>


More information about the samba-technical mailing list