Tdpkg — различия между версиями

Материал из YourcmcWiki
Перейти к: навигация, поиск
(Новая страница: «= 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...»)
 
м
Строка 5: Строка 5:
 
It currently works for the [http://www.debian.org Debian GNU/Linux] system.
 
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].
+
* Grab the sources (git master): https://gitorious.org/lethal-works/tdpkg/archive-tarball/master
 
+
* Source code repository: http://gitorious.org/lethal-works/tdpkg
Development version at the [http://gitorious.org/lethal-works/tdpkg git repository].
+
  
 
= build =
 
= build =

Версия 22:14, 4 октября 2012

Содержание

tdpkg

The tdpkg shared library is used to speed up dpkg *.list files loading using either tokyocabinet or sqlite3.

It currently works for the Debian GNU/Linux system.

build

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

Type make to build tdpkg with tokyocabinet support.

Type make CACHE=sqlite 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:

LD_PRELOAD=./libtdpkg.so dpkg ... 

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

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

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:

echo 1 > /proc/sys/vm/drop_caches