LDB_SCOPE_ONELEVEL without full traversal?

tridge at samba.org tridge at samba.org
Wed Dec 6 23:27:27 GMT 2006


Volker,

 > But then we are back where we are now: All registry values
 > for a key end up in a single tdb record. If you put the
 > printer data into that, quite large data will end up there,
 > and having all values for a key in a single record is going
 > to be slow.

You're worried about putting kilobytes in a record? Have you timed a
memcpy of a 10k bit of data lately? My laptop gets around 4GByte/sec
for that data size. So we're looking at about 2.5 usec. Compare that
to the cost of doing a whole pile of operations instead of one to load
a share. 

If you're really concerned about the cost of the binary printer data
then put it in a different place. You don't need it on tconx, so don't
put it in the same place. Put it in a differen record (note that in
ldap a single DN can contain both attributes and sub-records).

So you'd have:

dn: cn=share1,cn=smbconf,cn=samba,cn=software,cn=hklm
parmReadOnly: yes
parmPath: /home/foo/test

dn: cn=printData,cn=share1,cn=smbconf,cn=samba,cn=software,cn=hklm
parmBigData:: XXXXXXX

Cheers, Tridge


More information about the samba-technical mailing list