Mailing List Archive

Compression
Hi!

On #mediawiki <irc://irc.freenode.net/mediawiki> I was told that there
is an option to activate compression on the data stored in the database.
But the user didn't know how to activate that.

Does someone of you know, where I can find this option?

greets, Daniel
Re: Compression [ In reply to ]
On Nov 4, 2004, at 7:51 AM, Daniel Stiefelmaier wrote:
> On #mediawiki <irc://irc.freenode.net/mediawiki> I was told that there
> is an option to activate compression on the data stored in the
> database.
> But the user didn't know how to activate that.

$wgCompressRevisions = true;

This will compress text stored in the 'old' revisions table, if PHP has
zlib support enabled. This can save roughly half the space that the
table requires (each revision is individually compressed, currently).

Note that it's not enabled by default because a PHP without zlib
support cannot read the entries from a database that has been
compressed in this way, so if you switch by accident and can't change
it you're in for an unpleasant surprise. :)

When enabled it will start compressing newly saved revisions, but does
not affect existing data. There is a maintenance script
(compressOld.php) to go through and compress all the old data (must be
run from the command line), but due to the way MySQL works, disk space
will probably not actually be freed at that time, unless you rebuild
the table. But it will free up space internally to the table file,
which will be refilled with later data over time.

-- brion vibber (brion @ pobox.com)