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

Disabling transaction logging for slapadd (2.1.25, bdb)



I am trying to import a relatively large number of accouts (200k+) via 
slapadd on a box running 2.1.25, with a bdb database, and where ldbm took 
about 75minutes to import the whole ldif file, on bdb it had been running 
for 2 days when I stopped it (and it was about half way).

According to the OpenLDAP docs, I should be able to use the DB_CONFIG file 
to set some db options when using bdb, but I haven't had success that way.

For instance, having:
set_flag DB_TXN_NOT_DURABLE
# rm -f /var/lib/ldap/mail/*;cp -f /var/lib/ldap/DB_CONFIG_import 
/var/lib/ldap/mail/DB_CONFIG; slapadd -c -l 
/etc/openldap/net-mail-isp.ldif;time slapadd -l 
/tmp/mail_20031023-converted-nomodify.ldif -c -v
slapadd: could not add entry dn="cn=mail,ou=isp" (line=5): txn_begin 
failed: Invalid argument (22)
slapadd: could not add entry dn="cn=net,cn=mail,ou=isp" (line=10): 
txn_begin failed: Invalid argument (22)

The same happens if I have:
set_flag DB_TXN_WRITE_NOSYNC


Without any entries in DB_CONFIG, it imports fine (but writes transaction 
logs, and takes forever).

The client wants some benchmarks, and with the available time, it won't be 
practical to test with bdb if I can't speed up the import ...

Any ideas?

At present I am running with db-4.1.25.

Regards,
Buchan