High performance plone - Joel BurtonΒΆ

Tags: ploneconf2007, plone, cachefu

Handouts are at http://plonebootcamps.com/resources/high-performance-plone/view, so I'm not going to write anything down. If you're in need of a speedup of your plone site, watch last year's talk (quite a lot is the same, only info on the latest cachefu version and on memoize is missing). I do guess that we'll get a video of this year's talk, too. Here, I'll only highlight a few things.

Plone is pretty efficient. It just does a lot, like checking for authentication and finding all resources that are needed, creating the dynamic navigation, grabbing the right CSS bits. Most of these things cannot be made really faster. So the basic strategy is not to make plone faster, but to make plone do less. The everything-is-fresh default setting of Plone is the right choice, of course, as it would otherwise not meet your expectations and it would lead to loads of bugreports.

Sweet spot for performance: 2 zope threads at a time (instead of the default of 4).

Use zeo ALL THE TIME. Also on development boxes.

Especially on linux, default hardware parameters are often very conservative. hdparm for instance. Linux distributions are conservative as they want to run on all hardware. There's some serious opportunity for improvements here.

Think about caching right at the start when coding. Add a few ramcaches with obvious names (cache_per_user_for_5_minutes) and set the cache time to 0 seconds during development. RAMcaches: they gave discover magazine a 20-fold increase, which was more than they got out of cachefu and squid.

Question: aren't RAMcaches slowly going away? All those browser views? Python scripts shouldn't be used anymore. Answer: Joel loves python scripts. It was only recently that the new view classes and so were cachable with memoize. Before that, ramcached python scripts out-performed browser views by order of magnitudes. And ramcache have excellent security.

Memoize: new caching mechanism for zope3. Works great, completely tweakable. Drawback: not tweakable by the customizer/integrator. He expects that to change, though.

Useful strategy: focus on the tiny: microcaching is very helpful. 5 seconds to 5 minutes is often unlikely to be noticed. It can reduce work with 500x.

Plone can be made really fast. With ramcache, memoize, cachefu and apache/squid/varnish in front, it can be blazingly fast. (Reinout: That's also my own experience: you can make Plone a helluvalot faster). Cachefu is in need of more developers and especially documentation writers. Plone's caching story needs to get more well-known. Joel especially asked for more bloggers :-)

Technorati tag:

vanrees.org logo

About me

My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.

Weblog feeds

Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):