[Mediawiki-l] Saving new pages 100x slower when squid in use

Don Feliciano don.feliciano at runbox.com
Sat Oct 21 01:53:13 UTC 2006

I've recently migrated a 1.5.8 Wiki to a new machine.  In the process, I 
upgraded to 1.8.2, added memcached, eaccelerator, and squid (in 
accelerator mode).

Software in use:

# Gentoo Linux
# Apache 2.0.58
# PHP 5.1.6-r4
# Memcached 1.1.12-r2
# eAccelerator 0.9.5
# MySQL 5.0.24-r1 (with big-tables max-idx-128)
# MediaWiki 1.8.2

I did a lot of testing using LoadRunner (commercial performance test 
tool from Mercury) with each change/addition of the above.  Without 
question, squid makes an enormous (positive) impact on performance, 
particularly under load.

So, all is well and good with my new site, except...

Saving newly created pages and uploading files takes FOREVER when squid 
is turned on.

With no squid, saving a new page takes about 1 second.  With squid, 
saving a new page takes about 105 seconds.

I'm sure it's just a squid configuration problem, but I'm a squid newbie 
and don't know where to look.  Below is my squid.conf, created by 
pasting together options I found on the Web + things that looked 
important from the man page and default config file.

Any help debugging this will be appreciated.

# squid.conf

http_port vhost
cache_peer parent 80 0 no-query originserver
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
cache_mem 256 MB
maximum_object_size_in_memory 512 KB
cache_replacement_policy heap GDSF
cache_dir ufs /var/cache/squid 1024 16 256
logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st 
"%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
access_log /var/log/squid/access.log combined
cache_log none
cache_store_log none
emulate_httpd_log on
url_rewrite_host_header off
request_body_max_size 100 MB
refresh_pattern ^ftp:           1440    20%     10080
refresh_pattern ^gopher:        1440    0%      1440
refresh_pattern .               0       20%     4320
acl all src
acl manager proto cache_object
acl localhost src
acl web_ports port 80
http_access allow web_ports
http_access allow manager localhost
http_access deny manager
acl purge method PURGE
http_access allow purge localhost
http_access deny purge
acl UPLOADS url_regex /uploads/./
no_cache deny all UPLOADS
http_access deny all
cache_mgr squid_cache at stweb
mail_program mail
append_domain .mydomain.com
forwarded_for off
coredump_dir /var/cache/squid

More information about the MediaWiki-l mailing list