User:Ilya/OpenWetWare/Performance
From OpenWetWare
< User:Ilya | OpenWetWare
Jump to navigationJump to search
General
- Managing site growth - Slashdot article
- Survive heavy traffic with your webserver
From Meta:
- PHP configuration - opcode caching info
- MediaWiki is slow, how can I make it faster? - from MediaWiki FAQ
Caching
- The preference order: memcached first, Turck MMCache second, and eAccelerator third.
From Meta:
memcached
- performs object caching, see more info in wiki/docs/memcached.doc
- Memcached - from MediaWiki architecture in Meta
- Memcached - Wikipedia article
- Distributed Caching with 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
- Tugela
- Turck MMCache is no longer maintained and apparently buggy
- eAccelerator is a successor to Turck
- eAccelerator - Wikipedia page
- eAccelerator settings
- Zend Optimizer
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
- MySQL's Query Cache
- Tuning MySQL Server 4.0 Query cache
- Tuning MySQL: discussion about optimization of MySQL to handle a high traffic website
PHP
Apache
LAMP httpd.conf:
KeepAlive On KeepAliveTimeout 1