[Geoprisma-users] Speeding up the proxy

Yves Moisan yves.moisan at boreal-is.com
Mon Jun 21 08:56:51 EDT 2010


Hi All,

We have been pretty silent on the lists for the past few months but that 
does not mean we have remained idle.  Someone at Nippour found out the 
big proxy hit we were taking could be almost eliminated by a simple 
trick : storing the PHP session content in memcached rather than in a 
file.  Tests have shown that the proxy brings about a significant cost 
on performance (from 85 req/s down to under 10) and this had detrimental 
impacts for any tiled layer (e.g. a tilecached layer).  As most 
Apache/PHP set ups store the session contents in a file (e.g. MS4W 
stores it in ms4w/tmp), someone had the idea to store it in memcached 
instead and the performance hit is now significantly lowered (from 85 
req/s to around 75 req/s).  We should come up with a mechanism to bypass 
the proxy altogether in the coming weeks, but using memcached makes the 
proxy performance hit much less of an issue.

To summarize the solutions we have to increase performance up to now :

- use mod_python for tilecache (10 times as fast as cgi mode; NOTE : 
mod_python is retiring as a project soon but the code is still there; 
maybe mod_wsgi will be the way to use tilecache in the future)
- store the PHP session in memcached
- use the client-side caching PHP option (see config.php in examples) 
and compressed JS (also a PHP option)
- use more than one domain pointing to the same server to allow for more 
parallelization (e.g. of tilecache calls)

Cheers,

Yves


More information about the Geoprisma-users mailing list