tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re : pkgin again...
Hi all,
pkgin can quite easyly be ported to another database to remove the
dependency on sqlite3,
I have ported pkgin to freebsd to work with freebsd's pkg, and while
doing that I also created a test branch to remove the sqlite
dependency.
I first tried db 1.85 from libc but performances were not there, then
I tried using cdb (tinycdb in fact).
Why tinycdb : it is public domain, it is fast, it can be embedded in
the pkgin's code (two small files) or imported into (net|free)BSD's
base.
why a constant database : pkgin already uses sqlite has a constant
database for most of the tables : dropping everything et re-populate
for each update, so it won't change anything.
results :
On freebsd pkgin with sqlite was really slow, the performance
improvements using cdb is between 150% and 300% depending on the use
case.
On netbsd the performance improvements I notice is varying from 10% to
150% depending on the use case, only few use case are slower.
An other interesting thing is that the code seems simpler (at least to me :))
this is just a PoC and it can be greatly improves the way I use cdb is
not optimal.
you can find the code in my git (which is quite outdated)
http://git.etoilebsd.net/pkgin/log/?h=freebsd-nosql (be careful it can
kill your kitten)
if you are interesting with that I can create a 0.3.3.1 with cdb as a
backend instead of sqlite so that you can benchmark it yourself.
FYI you already have code using cdb (embedded) in you base as postfix uses it.
regards,
Bapt
Home |
Main Index |
Thread Index |
Old Index