= Trac and Performance = In the past, Trac garnered a reputation of being a fast web application. This was mainly due to its use of the ClearSilver template engine. Starting with version 0.11, Trac migrated to Genshi, another template engine, much more flexible and powerful in many ways, but also much slower and memory hungry. As the memory usage seems now mostly OK (#6614), there are still many concerns over the performance. However Genshi is not the only reason for the perceived slowdown, there are several other factors which have to be taken into account when analyzing performance: - the increased usage of plugins, each of them can add to the load in subtle ways - the new security model of TracFineGrainedPermissions - the conditions in which Trac is run (web front-end) - the specific configuration settings of Trac used - various bugs that might be triggered by any of the above! In this page we'll try to collect all the various pieces of information related to performance, in order to compile a "checklist" that can be followed when trying to troubleshoot a performance problem, or simply when one wants to get a better performance out of his Trac installation. == Unsorted == For getting this started, here's a list of some of the common problems: - serving static resources through Trac: for best performance, they're better served by the web server, see TracCgi#MappingStaticResources (well, and of course, if you're using Trac deployed as a cgi, don't come complain about performance!) [[br]] ''(Note: we should probably move the ''mapping static resources'' section to another page, e.g. [wiki:TracModWSGI])'' - if using mod_python, only use latest version (3.3.1); prefer mod_wsgi (>= 2.4) (daemon mode) - repository resync failure which results in a resync attempt for every request - easy to spot in the Trac log (see ticket:7490#comment:36); often due to the "prohibited" MySQL/MyISAM combination (#8067) - running Trac under QEMU is slow (ticket:7490#comment:42) - possible issues when using mod_deflate (#8534, googlegroups:trac-users:ab070d251f5a0d11); on the other hand, some people have good results with mod_deflate and advise using it (["TracDev/Performance/0.11.5#HowItimed"]) - use of `restrict_owner = true` can be (very) slow on some installations (see #4245, #8034, #8212 ...) - there was a bug up to 0.11.4 which could cause 100% cpu usage on some platforms (#7785, fixed in 0.11.5) - some plugins seem to have a high impact on the performance (read ["TracDev/Performance/0.11.5#customizationsandplugins"]) ---- See also: TracDev/Performance [[TitleIndex(TracPerformance/)]]