cs | de | en | es | et | fi | fr | hu | ka | lt | pl | pt-br | ro | ru | se
Log in     Join

LeMill server performance

by Tarmo Toikkanen — created on 2007-11-23 13:29 Share

As we get more and more teachers every week, our regular server setup has been getting too slow. What I did first was to set up "pen" which is relatively simple load-balancer, between Apache and Zope. This allowed me to start several zope instances in different ports, and bind them to invidivual processors on the server. However, pen allocates connections to servers based on the requestors IP address, and since all requests are coming through Apache running on the same machine, all IP addresses are 127.0.0.1 and no load balancing actually happens.

Well, after some digging I switched to using Apache2.2's own proxy_balancer module. This is very straightforward, except when users are logged in, they should always be redirected to the same Zope server, because session information isn't shared between server instances.

To do this I had to modify the setAuthCookie script to add some internal routing information, and use sticky cookie functionality of the proxy_balancer module. Instructions for doing that are here: http://plone.org/documentation/how-to/sticky-sessions-and-mo
d_proxy_balancer

And it works like a charm!

Comments:

Good! I think the service is still once in a while very slow. We probably should put more resources to the optimizing and to think where could we get more and better hardware. We should prepare to the growth.

Posted by Teemu Leinonen at 2007-11-27 18:40

Still having trouble with various clustered servers, and detecting when they're overloaded... I'm running some extensive profiling runs right now, so we should get proper data for optimization soon.

Posted by Tarmo Toikkanen at 2007-11-30 00:49

OK, I've installed CacheFu (a Plone product) that set up some additional tools for tweaking cache settings. For anonymous users many of the pages are now cached quite effectively and performance has gone up. There will be need for more changes, as some slow pages will need more caching, and some dynamic pages may have too much caching. So if a page seems to be "stuck" and always return the same results even though you expect something else, it might be a caching problem. Let me know about it (ticket in lemill.org) and I'll see to it.

Posted by Tarmo Toikkanen at 2007-12-19 16:03