User:Ilya/OpenWetWare/Performance

From OpenWetWare

< User:Ilya | OpenWetWare
Revision as of 22:08, 17 October 2007 by Ilya (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Contents

General

From Meta:

Caching

  • The preference order: memcached first, Turck MMCache second, and eAccelerator third.

From Meta:

memcached

Starting memcached:

$ memcached -d -l 127.0.0.1 -p 11000 -m 64

(in daemon mode, accessible only via loopback interface so that memcached is not publicly accessible, on port 11000, using up to 64MB RAM)

LocalSettings.php:

$wgUseMemCached = true;
$wgMemCachedServer = array("127.0.0.1:11000");

Other

Disabling

## Disable all forms of MediaWiki caching
$wgMainCacheType = CACHE_NONE;
$wgMessageCacheType = CACHE_NONE;
$wgParserCacheType = CACHE_NONE;
$wgCachePages = false;
$wgEnableParserCache = false;
$wgCachePages = false;

From Mediawiki 1.7 install screen: Using a shared memory system such as Turck MMCache, APC, eAccelerator, or Memcached will speed up MediaWiki significantly. Memcached is the best solution but needs to be installed. Specify the server addresses and ports in a comma-separted list. Only use Turck shared memory if the wiki will be running on a single Apache server.

Web server

  • Streamlining your web server:
    • on our server turning off logging reduced the server load from 4.10 to 0.50 and reduced the open apache2 servers by half.
    • If you want to be able to handle a slashdot or digg you need to turn off logging. Use Urchin/Google Analytics or Mint http://haveamint.com/ instead.
  • Squid will help with caching anonymous requests helps to keep apache processes from running, and runs squid processes to pass the data on to the client. Apache processes can have a huge footprint. Also, Squid will cache commonly used images, css and javascript files in RAM making them serve faster with less disk access (which is slow).

MySQL

my.cnf:

set-variable    = query_cache_size=200M

PHP

Apache

LAMP httpd.conf:

KeepAlive On
KeepAliveTimeout 1
Personal tools