[elephant-devel] garbage collection
Ian Eslick
eslick at csail.mit.edu
Wed Jul 11 01:32:36 UTC 2007
Dmitri,
The latest version in CVS does export a compact function that works
on BDB stores, but it only truncates the end of the %ELEPHANT file
and isn't very reliable because if you haven't dropped the last
object added then it can't truncate at all.
If you do drop objects, BDB should reuse the pages that were
allocated to those objects so it should grow more slowly, but it
doesn't reorganize to optimize space so fragmentation can lead to an
inefficient use of space.
However, the best way to reclaim disk space today is to migrate from
your current BDB store to a new one. This will copy over only those
objects that are globally reachable; namely anything reachable from
the controller-root and all indexed instances.
At some point I'll finish a wrapper function for this (currently a
sketch is in src/elephant/gc.lisp and called via elephant::stop-and-
copy-gc) but you are better off doing the copy manually for now.
If the documentation doesn't make this process clear, please write
back to us.
Good luck,
Ian
On Jul 10, 2007, at 7:19 PM, Dmitri V. Gorbatovsky wrote:
> Hello, from grateful user.
> I find that size of %ELEPHANT file (BDB) only grows with
> time and transactions. No matter how many objects I delete.
> Is there are any conventional way to shrink it?
> Sorry if the question is stupid, Iam not really advanced
> in Berkeley db usage.
>
> Thanks, DG
> _______________________________________________
> elephant-devel site list
> elephant-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel
More information about the elephant-devel
mailing list