RPM Community Forums

Mailing List Message of <rpm-devel>

Re: RPM DB, Berkley DB and journal files

From: Per Ųyvind Karlsen <pkarlsen@rpm5.org>
Date: Tue 28 Jun 2011 - 19:35:23 CEST
Message-ID: <BANLkTikH8a+hr-bC802fdM+PzSMSNvhZ0Q@mail.gmail.com>
2011/6/28 Mark Hatle <mark.hatle@windriver.com>:
> I was hoping someone can help me understand what is happening and how to address
> it for our embedded system needs.
>
> For reference:
>
> http://bugzilla.pokylinux.org/show_bug.cgi?id=1174
>
> from the above, the complaint is:
>
> When using zypper/rpm install/removal package, database files and log files
> cost a lot of disk space and may cause target image out of space.
>
> The first time when we use RPM, a lot of database files will be created, larger
> than 10MB.
>
> ---
>
> Each of the __db.* files created are large.  Nearly 10 MB each.  In addition in
> the "log" directory are additional files that are also nearly 10 MB each.
>
> Are there any suggestions for changing the BerkleyDB configuration, either the
> config file or RPM settings/usages that would help me shrink down these sizes --
> or potentially help me eliminate the creation of these files?
>
> I'm currently using rpm-5.4.0 from rpm-5.4.0-0.20101229.src.rpm.

You probably want to enable automatic log removal, ie. look at
Db_open() in URPM:
http://svn.mandriva.com/cgi-bin/viewvc.cgi/soft/rpm/perl-URPM/trunk/URPM.xs?revision=272986&view=markup

For where it's actually gets enabled, look closer at line 3270.

This will make berkeley db remove all the log files that's not needed
so that you'll
only keep the last file under /var/log/rpm/log.

--
Regards,
Per Ųyvind
Received on Tue Jun 28 19:41:11 2011
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.