Hi,

At one wiki host there is 5.3.3-7+squeeze14 with apc 3.1.3p1 (both are quite 
old however these are provided by Debian and I am not a regular admin of the 
server).
The wiki host has about 10-20k visits per day and about 3500 of pages. It's not 
the smallest wiki.

There is apc.ini (already tweaked in hope to get a better utilization but no 
avail):
extension=apc.so

apc.enabled=1
apc.shm_segments= 1
apc.shm_size= 256
apc.ttl= 0 ; 7200
apc.user_ttl = 0 ; 7200
apc.gc_ttl = 0 ; 7200 ; was: none
apc.num_files_hint = 0; 1024
apc.user_entries_hint = 10000 ; was: none
apc.mmap_file_mask = /tmp/apc.XXXXXX
apc.enable_cli = 0 ; 1
apc.cache_by_default = 1
apc.max_file_size = 10M
apc.stat = 1; 0
apc.write_lock = 1 ; was: none
apc.localcache = 1 ; was: none
apc.localcache.size = 256 ; was: none

Part of LocalSettings.php (tried both CACHE_ACCEL constant and 'apc' string key 
without any difference):
$wgMainCacheType = CACHE_ACCEL; # 'apc';
$wgMessageCacheType = CACHE_ACCEL; # 'apc';
$wgParserCacheType = CACHE_ACCEL; # 'apc';


However, apc.php monitoring script shows really low user cache usage which goes 
between 100K and 4M in about 20-30 seconds of time.

My actions:
1. I set all apc*ttl settings to zero in hope entries would not be timed out 
from cache.
2. I set apc.user_entries_hint = 10000 in suspect that MediaWiki may write a 
lot of entries, thus older apc user cache entries are purged out.
3. I disabled all extensions except of Cite / ParserFunctions in suspect that 
some of them might purge client cache or parser cache.
LocalSettings.php does NOT have $wgEnableParserCache = false;
4. I switched from custom skin to standard 1.19.2 Vector skin.

Nothing made any difference, user cache utilization is still very low after 
about a hour of apache restart.

There are some client JS scripts, maybe I should try to disable these as well?

I tried to place debug calls into APCBagOStuff. MediaWiki seems to almost never calls 
->delete(), a lots of ->set() and ->get().
Parser cache entries with 'pcache:idhash' keys have ttl of 86400 seconds, which 
should be sufficient enough to fill 256MB of apc user cache.

Why the user cache is so low and why about every 10-30 seconds it loses lots of 
entries, reducing from 4MB to 100K in apc.php monitoring script? Even if users 
were visiting only few of 3500 pages, there should not be such cache drop.

Dmitriy

_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to