MladiPodjetnik.si performance tweaks

MladiPodjetnik.si is a portal we’ve been actively developing since 2006 and has since seen 3 revisions. The latest one, running on Plone 3.1, was running out of juice due to enormous increase in traffic in the last year. It was time to do some performance optimization.

1. We started out by upgrading Plone to the latest 3.x realease – 3.3.5. A fairly straightforward procedure.

2. Then we focused on optimizing Zope settings:

  • setting python-check-interval to 1000
  • lowering ZServer threads (we could do this because we were adding ZEO clustering with several Zopes)
  • tweaking ZODB cache size
  • disabling Z2.log
  • specifying only one language (Slovenian) for the Placeless Translation Service
# add these lines to [instance] section of your buildout.cfg
z2-log = off
zodb-cache-size = 13500
zserver-threads = 1
zope-conf-additional =
    python-check-interval 1000
environment-vars =
    PTS_LANGUAGES sl

3. Binding to a newer version of zope.i18nmessageid fixes severe memory leaks in Zope.

[versions]
zope.i18nmessageid = 3.5.1

4. Finally we built and configured HAProxy load-balancer so we can have several Zopes serving those requests.

Result: Tweaking proved to be successful as we no longer get time-outs on traffic peaks and the site feels much more snappier than before. Munin graphs confirm this.