UESPWiki:Memcache

The UESPWiki – Your source for The Elder Scrolls since 1995
Jump to: navigation, search

Current Settings[edit]

Note that prior to 7 August 2009 both content1 and content2 had their own memcached servers. Currently there is a single, shared memcached running on content1.

  • Memory = 512M
  • User = nobody
  • Port = 11000
  • Only the content1/content2 subnets are permitted on port 11000

Statistics[edit]

content1 - 7 August 2009[edit]

VERSION 1.2.2
stats
STAT pid 20146
STAT uptime 29112329
STAT time 1249661747
STAT version 1.2.2
STAT pointer_size 32
STAT rusage_user 17350.571312
STAT rusage_system 37752.128804
STAT curr_items 930963
STAT total_items 20589336
STAT bytes 233174376
STAT curr_connections 3
STAT total_connections 91087591
STAT connection_structures 270
STAT cmd_get 422389557
STAT cmd_set 20844442
STAT get_hits 276497893
STAT get_misses 145891664
STAT evictions 214433
STAT bytes_read 54484121434
STAT bytes_written 4448576331212
STAT limit_maxbytes 268435456
stats slabs
STAT threads 1
STAT active_slabs 34
STAT total_malloced 269721148
  • Uptime = 337 days
  • Cache Hits = 65%


content2 -- 7 August 2009[edit]

VERSION 1.2.2
stats
STAT pid 14498
STAT uptime 13870464
STAT time 1249661885
STAT version 1.2.2
STAT pointer_size 32
STAT rusage_user 2823.533757
STAT rusage_system 13355.814607
STAT curr_items 798871
STAT total_items 18124795
STAT bytes 234753336
STAT curr_connections 1
STAT total_connections 68860676
STAT connection_structures 122
STAT cmd_get 410431705
STAT cmd_set 18128290
STAT get_hits 215214621
STAT get_misses 195217084
STAT evictions 496180
STAT bytes_read 56331086143
STAT bytes_written 3797958601514
STAT limit_maxbytes 268435456
STAT threads 1
stats slabs
STAT active_slabs 33
STAT total_malloced 269811332
  • Uptime = 161 days
  • Cache Hits = 52%

Wikimedia Configuration[edit]

The Mediawiki articles on memcached, including the Cache manual and memcached.txt documentation, are a bit vague on the details of how to configure the cache once you move to multiple content servers. The following details were gleaned from various Wikimedia articles on the configuration of their farms of servers (e.g., Cache strategy, Wikimedia servers). Some of the information is more general than just memcached configuration.

  • All Wikimedia content servers (the "Apaches" in their system) share the same memcached information.
    • From UESP's experience, this is necessary to prevent problems such as: edits to system messages only appearing on the one content server that processes the edit; newly uploaded files appear to be missing on content servers other than the one that processes the upload.
    • The memcache, however, is distributed over multiple servers (about half of their content servers are also memcached servers). For example, a request for information "x" will always go to server #25 (no matter which of the 300 content servers make the request), but a request for information "y" will always go to server #27.
    • The distribution of the memcached information is handled automatically by the software -- if $wgMemCachedServers lists multiple servers, memcached automatically decides what information is stored where, using a hash table.
    • Login session IDs are also memcached
  • All content servers "share their work directories by NFS".
    • Presumably this means the file cache (if Mediawiki is even using a file cache) is one of the shared directories.

Related Links[edit]