RPM Community Forums

Mailing List Message of <rpm-devel>

Re: rpmdb size

From: Jeff Johnson <n3npq@mac.com>
Date: Thu 03 Dec 2009 - 15:25:26 CET
Message-id: <D16712C9-E32D-4CFA-8335-D743F6BD3496@mac.com>

On Dec 1, 2009, at 5:07 AM, Bernhard Rosenkraenzer wrote:

> Hi,
> we've been using rpm5 head on our build machines for about 2 weeks now -
> after increasing the number of locks in DB_CONFIG, it works very reliably,
> but now the build machines are running out of diskspace because the rpm
> database takes up several (>20) gigabytes of space.
> 
> The files that have always been there are about the size they used to be,
> but every rpm invocation creates a new log.000* files, each 10 MB in size.
> 
> I can see why the rollback features they bring along can be important to
> some people, but for desktop users who install lots of updates on
> relatively small disks (and for developers who build lots of stuff) this
> can be a real problem -- is there a way to limit the number/size of log.*
> to keep it within reasonable boundaries, short of running
> 
> cd /var/lib/rpm
> rm -f `ls |grep -vE (Packages|DB_CONFIG)`
> rpm --rebuilddb
> 
> whenever it gets too large?
> 

Here's the CLI commands needed to remove log files:

	cd /var/lib/rpm
	/usr/lib/rpm/bin/db_checkpoint -1
	/usr/lib/rpm/bin/db_archive -d

There's also db_recover, which will abort uncommitted database transactions.

(aside)
The db_recover utility likely "works" now that I've made the logging abstractions
necessary for syscall/scriptlet ACID "opt-in". untested atm.

All of the db_checkpoint/db_archive/db_revover mechanism is easily
automated directly in -lrpmdb.

What is harder is devising "policy" to attempt the RPM implementation that is
consistent with goals other than
	What is this "stuff"?!? Nuke it!

hth

73 de Jeff
Received on Thu Dec 3 15:25:48 2009
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.