Tugela Cache

Intro
As large MediaWiki deployments may gain performance using Memcached, at some level cost of RAM to store all objects becomes too high. In order to balance resource usage and take more use of Apache server disks, Tugela, the distributed cached on-disk hash database, has arrived.

Sources can be found at Mediawiki CVS repository as a module tugelacache.

Design
As this work is derived from Memcached, there is lots of original code, but theese changes:


 * Internal slab allocator replaced by BerkeleyDB B-Tree database.
 * Expiry policy management moved to external program tugela-expire
 * Lots of statistics code made obsolete.

Build
Make sure you've got  (a memcached dependancy as well) installed, and try running. In case of failure, take a look at DBLIB variable in  and tune it to your system (RedHat-like systems may have just 'db').

Tugela
command line parameters are quite same as memcached's and can be found with -h switch. Though, two things, that differ are: -m mbytes - specifies not total store size, but in-memory cache, used by BerkeleyDB -f file   - specifies a database file -s secs   - force database sync this often

Tugela-expire
The cache expiration program does not have any network interface yet, but it's output can be sent with external commands like telnet or netcat to listening socket of cache daemon. Telnet might need some more tricks, like: (tugela-expire;sleep 1) | telnet localhost 11211

Available parameters are: -f file   - database file -o days   - purge all entries older than specified days -p prefix - touch only keys, starting with prefix

Database management
As on-disk file is a regular BerkeleyDB database, standard suite programs may be used for data management, statistics and analysis:
 * db_stat
 * db_verify
 * db_dump
 * db_restore

Contact
All questions can be directed to Domas Mituzas or standard developer contact methods.