Изменения

Перейти к: навигация, поиск

Tdpkg

1577 байтов добавлено, 21:06, 2 октября 2012
Новая страница: «= tdpkg = The '''tdpkg''' shared library is used to speed up [http://en.wikipedia.org/wiki/Dpkg dpkg] *.list files loading using either [http://1978th.net/tokyoc...»
= tdpkg =

The '''tdpkg''' shared library is used to speed up [http://en.wikipedia.org/wiki/Dpkg dpkg] *.list files loading using either [http://1978th.net/tokyocabinet/ tokyocabinet] or [http://www.sqlite.org sqlite3].

It currently works for the [http://www.debian.org Debian GNU/Linux] system.

Latest version is 1.0. Grab the sources: [http://lethalman.hostei.com/download/tdpkg-1.0.tar.gz tdpkg-1.0.tar.gz].

Development version at the [http://gitorious.org/lethal-works/tdpkg git repository].

= build =

'''Requirements''': build-essential, libsqlite3-dev ''(for the sqlite3 backend)'' and libtokyocabinet-dev ''(for the tokyocabinet backend)''

Type <code>make</code> to build tdpkg with tokyocabinet support.

Type <code>make CACHE=sqlite</code> instead for sqlite3 support.

'''Important''': Library is experimental, it could make your system highly unstable.

= usage =

Please make a backup copy of your /var/lib/dpkg/info/ directory before using tdpkg.

Manual usage:

<pre>LD_PRELOAD=./libtdpkg.so dpkg ... </pre>

For system-wide usage use an alias (make sure you use the absolute path to libtdpkg.so):

<pre>alias dpkg="LD_PRELOAD=/path/to/libtdpkg.so dpkg"
alias apt-get="LD_PRELOAD=/path/to/libtdpkg.so apt-get" </pre>

The cache for both sqlite3 and tokyocabinet is located at '''/var/lib/dpkg/info/tdpkg.cache'''.

= benchmarking =

The operations involved with dpkg database reading are mostly done on the file system. For this reason cleaning up the kernel cache is a must before calling either tdpkg or dpkg:

<pre>echo 1 > /proc/sys/vm/drop_caches</pre>

Навигация