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

Re: LMDB file size, again

Christian Sell wrote:
following up to my previous question regarding file size, I would like to ask
about the recommended approach:

You're being stupid.

The documentation already clearly states:

    The size of the memory map is also the maximum size of the database.
    The value should be chosen as large as possible, to accommodate future
    growth of the database.

1. set a low file size initially, watch for MDB_MAP_FULL return codes and
increase the file/map size stepwise as needed

No. That would be stupid.

2. choose a large file size and reduce the size by doing a mdb_copy when the
application shuts down

No. That would be stupid.

or maybe a combination of the two? How does SQLightning handle this (2.
doesn't sound practical)?

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