Handbuch:mctest.php

From mediawiki.org
This page is a translated version of the page Manual:Mctest.php and the translation is 71% complete.

Details

mctest.php is a MediaWiki maintenance script that makes several 'set', 'incr', 'get' requests on every memcached server and shows a report.

Optionen/Argumente

Option Beschreibung Notwendig Standardwert
--i Number of iterations Optional 100
--cache Use servers from this $wgObjectCaches store Optional
--driver Either "php" or "pecl" Optional php
--server[:port] Memcached server to test, with optional port Optional

Verwendung

php maintenance/mctest.php [ --i| --cache| --driver| --server[:port] ]

Basic test

Terminal
$ php maintenance/mctest.php

Warming up connections to cache servers...done
Single and batched operation profiling/test results:
127.0.0.1:11211
 add: 100/100 8ms   set: 100/100 7ms   incr: 100/100 9ms   get: 100/100 (7ms)   delete: 100/100 (1ms)
 setMulti (IB): ✓ 2ms   getMulti (IB): 100/100 0ms   changeTTLMulti (IB): ✓ 1ms   deleteMulti (IB): ✓ 1ms
 setMulti (DB): ✓ 2ms   getMulti (DB): 100/100 0ms   changeTTLMulti (DB): ✓ 1ms   deleteMulti (DB): ✓ 1ms

Test with custom iterations

Terminal
$ php maintenance/mctest.php --i 500

Warming up connections to cache servers...done
Single and batched operation profiling/test results:
127.0.0.1:11211
 add: 500/500 9ms   set: 500/500 7ms   incr: 500/500 7ms   get: 500/500 (9ms)   delete: 500/500 (7ms)
 setMulti (IB): ✓ 14ms   getMulti (IB): 500/500 3ms   changeTTLMulti (IB): ✓ 7ms   deleteMulti (IB): ✓ 7ms
 setMulti (DB): ✓ 13ms   getMulti (DB): 500/500 3ms   changeTTLMulti (DB): ✓ 7ms   deleteMulti (DB): ✓ 7ms

Test with custom server and port

Terminal
$ php maintenance/mctest.php "127.0.0.1:12345"

Warming up connections to cache servers...done
Single and batched operation profiling/test results:
127.0.0.1:12345
 add: 0/100 0ms   set: 0/100 0ms   incr: 100/100 0ms   get: 0/100 (0ms)   delete: 0/100 (0ms)
 setMulti (IB): ✗ 0ms   getMulti (IB): 0/100 0ms   changeTTLMulti (IB): ✗ 0ms   deleteMulti (IB): ✗ 0ms
 setMulti (DB): ✗ 0ms   getMulti (DB): 0/100 0ms   changeTTLMulti (DB): ✗ 0ms   deleteMulti (DB): ✗ 0ms

Häufiger Fehler

MediaWiki isn't configured for Memcached usage

This error occurs when your MediaWiki installation is not configured properly with memcached server.

MediaWiki isn't configured with a cache named '$cache'

This indicates that you have not configured the '$cache' properly in $wgObjectCaches. Check LocalSettings.php for configuration details.


Siehe auch