Translate Toolkit & Pootle

Tools to help you make your software local

User Tools


Pootle Optimisation

Pootle 2 runs much faster than previous versions, but you can probably still do a few things to improve performance. With a few extra steps, you can support more users and more data. Here are some tips for performance tuning on your Pootle installation.

  • Ensure that Pootle runs under a webserver like Apache, or a fastcgi server.
  • If you really can't install under another web server, at least install cherrypy which Pootle will automatically use. This will help a little bit with performance.
  • Be sure to use a proper database server like MySQL instead of the default SQLite. You can migrate an existing installation if you already have data you don't want to lose.
  • Install memcached and enable it in the settings file.
  • Install the latest recommended version of all dependencies. Especially Django and the Translate Toolkit might affect performance. Django 1.0 will badly affect performance. Later versions of Pootle should also give better performance. You can upgrade to newer versions of Pootle easily.
  • Disable live translation.
  • Disable DEBUG mode.
  • Ensure that the zip and unzip commands are installed on your server. These can improve the performance during upload and download of large ZIP files.
  • Ensure that you have an indexing engine installed with its Python bindings. This will improve the performance of searching in big projects. PyLucene should perform better, although it might be harder to install.
  • Ensure that you have python-levenshtein installed. This will improve the performance when updating from templates.
  • Increase the cache timeout for users who are not logged in.
  • Increase your parse pool size if you have enough memory available.
  • Enable 'django.contrib.sessions.backends.cached_db'.
  • Disable swap on the server. Things should be configured so that physical memory of the server is never exceeded. Swapping is bound to seriously degrade the user experience.
  • If your Pootle version is < 2.1, you can Vacuum your statistics database with
  sqlite3 Pootle/dbs/stats.db "VACUUM;"

Apache

For Apache, review your server settings so that you don't support too many or too few clients. Supporting too many clients increase memory usage, and can actually reduce performance.

No specific settings can be recommended, since this depends heavily on your users, your files, and your hardware. However the default value for the MaxClient directive (usually 256) is almost always too high. Experiment with values between 10 and 80.

MySQL

If using MySQL backend, for smaller installations it is suggested to go with MyISAM backend (which might result in smaller memory usage and better performance). If high concurrency is expected, InnoDB is suggested to avoid locking issues.

Customising templates

Some templates, especially the front page, require lots of processing for displaying the detailed statistics. You could change how the page is generated to avoid some of that load. Since this page and the statistics should be cached for non-logged in users, most installations would probably not need to look into this. Talk to one of the developers about ways in which to improve this if you are interested.

Fast PO implementation

If you want better performance for your PO based operations, you can try to enable the fast new PO implementation available since Translate Toolkit 1.5.0. This implementation will be used if USECPO=2 is available in the operating system environment variables. Note that this is different from the Apache environment variables.

Your PO files will have to have character encodings specified, and be perfectly valid PO files (no duplicate messages or other format errors). Be sure to test this extensively before you migrate your live server to this setup.