Re: articles.gdbm file never get's smaller in size
Mirko Liss <[email protected]> Sun, 19 Oct 2003 21:23:37 +0200
| Newsgroups | gmane.network.noffle.user |
|---|---|
| Message-ID | <[email protected]> |
Jim Hague: > On 19-Oct-2003 Miernik wrote: > > My /var/spool/noffle/data/articles.gdbm file never gets smaller in > > size. > > Unfortunately, that's right. Noffle uses a gdbm file to store articles. Gdbm > doesn't shrink files normally and desn't appear to be that good at reclaiming > deleted space, though the gdbm manual page claims gdbm will reuse space vacated > by deleted records. In fact, it does. falloc.c:_gdbm_alloc() looks for the first available block of sufficient size. It reclaims as much as it it needs and frees the rest. falloc.c:_gdbm_free() merges adjacent blocks of available space to prevent fragmentation. Some fragmentation does still occur, but IMHO gdbm does a fairly good job of managing freed space. Well. This applies to the old, musty gdbm-1.8.0 from 1999. But the ancient, mouldy gdbm-1.7.3 from 1994 is not able to merge blocks of available space. Miernik, which version of gdbm is used by your distribution? ------------------------------------------------------- This SF.net email sponsored by: Enterprise Linux Forum Conference & Expo The Event For Linux Datacenter Solutions & Strategies in The Enterprise Linux in the Boardroom; in the Front Office; & in the Server Room http://www.enterpriselinuxforum.com