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

Re: LMDB use of sparse or non-sparse data file



Geoff Swan wrote:
I had to duplicate an LMDB database for replication recently, and used mdb_copy to do so.
One server is using the original data.mdb database (which is sparse)
and the other is using the mdb_copy non-sparse data.mdb file.

If you specified no special options, the file produced by mdb_copy is identical to the original - it will also be sparse if the original is.

The two servers are identical (hardware, OS, software and
configuration). OpenLDAP-2.4.39 is being used, 64 bit Linux OS. mdb_stat
shows the map size as the same, which is expected.

Will the use of the non-sparse file cause any performance issues?

Question is irrelevant since both are sparse files.

The reason for asking is that I am seeing a difference in search times between the two.
With 20 million objects, a search on modifyTimestamp (which is indexed) gives:
server 1: approx 1s
server 2: approx 60s

server 2 started with the same search time as server 1 when the
databases were originally copied, but has slowly increased its search
time over about a week for this same search.

Look at disk I/O and memory usage, the LMDB file itself has no bearing here.

--
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/