RPM Community Forums

Mailing List Message of <rpm-users>

Re: RPM sqlite3 support

From: Mark Hatle <mark.hatle@windriver.com>
Date: Tue 12 Jan 2016 - 18:03:34 CET
Message-ID: <569531E6.1080009@windriver.com>
On 1/12/16 10:25 AM, Jate Sujjavanich wrote:
> I am using rpm 5.4.9 as my package manager on an embedded system, and I am
> running into some bottlenecks with the Berkeley database. I am using an SD Card
> as my root file system.
> 
> The rpm transactions from a kernel upgrade take an hour or so. Using the --stats
> option, I found that rpm was spending 15 or so seconds total per package in
> dbadd, dbget, etc. An strace revealed that many fsyncdata calls were happening.
> It appears this is due to ACID-ity of transactions.
> 
> I found some posts saying that sqlite could be used as the database backend, so
> I tried this. I tried using configure to activate sqlite without success.
> 
> I can compile with sqlite support, but so far, I can't get RPM to create any
> sqlite files. I've tried database conversion, initializing an empty RPM
> database, and setting _dbapi to 4 in /usr/lib/rpm/macros.
> 
> I discovered that within configure.ac <http://configure.ac>, DBAPI is hard coded
> to 3 (Berkeley DB).
> 
> I would like to know if sqlite3 as a backend is supported by RPM these days in
> 5.4.9 or any other versions. I want to find out if some of the patches within
> yocto/poky are breaking sqlite support.

sqlite3 was used semi-maintained in older versions, but by 5.4.9 it had pretty
much bit rotted to not being functional.

Note, sqlite support was -much- slower then BerkeleyDB.  It was only added to
deal with people who didn't want to have the Sleepcat license conditions.
Performance was definitely not the reason.

If your device can live w/o the syncs, you can disable them -- mostly in the RPM
configuration... just keep in mind if someone powers down in the middle of a
transaction the data base is more likely to be messed up then with the fsyncs.

--Mark

> Jate
> 
Received on Tue Jan 12 21:07:44 2016
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.