[Yum-devel] [RFC] dbversion 10

James Bowes jbowes at redhat.com
Mon Apr 9 22:41:16 UTC 2007


Hi all:

So here, for your amusement and subject to your general mockery, are two
patches that modify the database in such a way as to break compatibility
with existing code.

In a nutshell, the code stores as many values as possible in the db as
integers, rather than text. Also, it drops the checksum_value row,
because this is the same as pkgId.

We could also just drop the header_start and header_end columns, because
 yum is awesomer now and doesn't need them.

Some stats (just the development repo):

new db -

db generation - 8.64user 0.88system 0:11.85elapsed
13M filelists.xml.gz.sqlite
30M other.xml.gz.sqlite
4.7M primary.xml.gz.sqlite
remove glibc - 33.82user 2.78system 0:37.61elapsed
install eclipse-cdt - 11.26user 1.99system 0:13.85elapsed

original db -

db generation - 8.92user 0.90system 0:12.31elapsed
13M filelists.xml.gz.sqlite
31M other.xml.gz.sqlite
5.2M primary.xml.gz.sqlite
remove glibc - 34.09user 2.71system 0:37.85elapsed
install eclipse-cdt - 14.61user 2.50system 0:17.79elapsed

Nothing too mind-blowing, but the space savings and install speedup are
nice.

Some things that could be done but probably shouldn't:
- Convert the values from ints to strings as they are pulled out of the
database. I'd rather not do this for performance reasons, but it would
mean that the API is not broken (see epoch related code in the yum patch)
- Write equivalent code for sqlitecache.py. I didn't because C is the
best. Also it's probably about time to drop that file.
- Store the pkgId as raw data rather than a printable string. This would
save 20 bytes per pkgId, but pysqlite makes it very difficult to do
anything with this value once you've gotten it out of the db.

Since these patches will make Tim have to rewrite large amounts of code,
I say we apply them post yum 3.2.

What say everyone?

-James
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ymp-dbv10.patch
Type: text/x-patch
Size: 12293 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20070409/e6209a11/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: yum-dbv10.patch
Type: text/x-patch
Size: 4421 bytes
Desc: not available
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20070409/e6209a11/attachment-0001.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : http://lists.baseurl.org/pipermail/yum-devel/attachments/20070409/e6209a11/attachment.pgp 


More information about the Yum-devel mailing list