[Mediawiki-l] Compression

Brion Vibber brion at pobox.com
Thu Nov 4 19:31:26 UTC 2004

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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.wikimedia.org/pipermail/mediawiki-l/attachments/20041104/6684a925/attachment.pgp 

More information about the MediaWiki-l mailing list