Changes between Version 17 and Version 18 of TracPerformance
- Timestamp:
- Jan 9, 2016, 9:22:30 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracPerformance
v17 v18 1 [[PageOutline(2-5,Contents,pullout)]] 2 1 3 = Trac and Performance 2 4 3 With Trac 0.11, the ClearSilver template engine was replaced with the Genshi template engine, but with its increased flexibility, Trac also became slower and memory hungry. As memory usage seems now mostly OK (#6614), there are still manyconcerns over Trac's performance.5 After the adoption of the [genshi:Genshi] template engine in [/milestone/0.11 Trac 0.11] in 2008, some associated performance issues were also solved (#6614). There are however, still occasional concerns over Trac's performance. 4 6 5 However, apart from Genshi, there are several other factors to be taken into account when analyzing performance:6 - the increased usage of plugins, each of them canadd to the load in subtle ways7 When dealing with performance degradation on a Trac installation there are some potential causes to consider: 8 - a large number of plugins may add to the load in subtle ways 7 9 - the new security model of TracFineGrainedPermissions 8 10 - the conditions in which Trac is run (web front-end) 9 11 - the specific configuration settings of Trac 10 - various bugs that might be triggered by any of the above !12 - various bugs that might be triggered by any of the above 11 13 12 14 This page collects Trac performance issues, solutions and troubleshooting. … … 17 19 18 20 The second main installation mistake relative to performance would be to serve static resources through Trac. 19 For best performance, Trac pages are better served by a web server, see TracCgi#MappingStaticResources. 20 ''(Note: we should probably move the ''mapping static resources'' section to another page, e.g. [wiki:TracModWSGI])'' 21 For best performance, Trac pages should be served by a web server, see TracInstall#MappingStaticResources. 22 {{{#!comment 23 we should probably move the ''mapping static resources'' section to another page, e.g. [wiki:TracModWSGI] 24 }}} 21 25 22 26 Other points worth checking: 23 - if using mod_python, only use latest version (3.3.1); prefer mod_wsgi (>= 2.4), ie daemon mode24 - running Trac under the QEMU virtualizer is slow (ticket:7490#comment:42)25 - in Apache, there's a possible issue 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"])26 - some 3^rd^ party packages, such as Pygments, could also be responsible for heavy CPU loads; specifically, Pygments 1.0's scala mode([https://bitbucket.org/birkenfeld/pygments-main/issue/392/scala-lexer-hangs-forever #392]).27 - ensure an image has been configured as the trac logo in the top left. The default install from Ubuntu 10.04 for example does not include a default logo and this makes pages slow to load.27 - When using '''mod_python''', use at least version 3.3.1; prefer '''mod_wsgi''' (at least version 2.4), ie daemon mode. 28 - Running Trac under the '''QEMU virtualizer''' is slow (ticket:7490#comment:42). 29 - In Apache there is a possible issue when using '''mod_deflate''' (#8534, googlegroups:trac-users:ab070d251f5a0d11); however, some people have good results with mod_deflate and advise using it (["TracDev/Performance/0.11.5#HowItimed"]). 30 - Some third party packages, such as '''Pygments''', could also be responsible for heavy CPU loads; specifically, Pygments 1.0's '''scala mode''' ([https://bitbucket.org/birkenfeld/pygments-main/issue/392/scala-lexer-hangs-forever #392]). 31 - Ensure an image has been configured as the Trac logo in the top left. The default install from Ubuntu 10.04 for example does not include a default logo and this makes pages slow to load. 28 32 29 33 == Check your configuration #Configuration … … 32 36 33 37 === `[timeline]` #timeline-section 38 34 39 - `default_daysback` set to a high value might introduce quite some load, depending on the activity. 35 40 Pick an appropriate value for your site. 36 41 - the default `max_daysback` can be inappropriate, eg allowing 90 days for a site with lots 37 of activity might be too much. Don't hesitate to reduce it, especially now that we have paging 38 - any setting other than `changeset_show_files = 0` can be really expensive, 39 depending on the quantity of changesets to process 42 of activity might be too much. Don't hesitate to reduce it, especially now that Trac supports paging 43 - any setting other than `changeset_show_files = 0` can be expensive, depending on the quantity of changesets to process 40 44 41 45 === `[ticket]` #ticket-section 42 - use of `restrict_owner = true` can be slow on some installations (see #4245, #8034, #8212 ...) 46 47 - use of `restrict_owner = true` can be slow on some installations (see #4245, #8034, #8212). 43 48 44 49 == Check your [TracLogging trac.log] #Log … … 50 55 If you find such lines ''and the `cached rev` value doesn't change'', this corresponds to a repository resync failure, which results in a resync attempt for every request (see ticket:7490#comment:36); often as a result of the "prohibited" MySQL/MyISAM combination (#8067). 51 56 - WARNING message: '''Slow mail submission''' [[br]] 52 A mis-configured or simply slow mail server make Trac appear very slow (#3220 and numerous others).57 A mis-configured or simply slow mail server make Trac appear very slow (#3220). 53 58 54 59 == Unsorted … … 56 61 - There was a bug up to 0.11.4 which could cause 100% CPU usage once in a while on some platforms (#7785, thought to be fixed in 0.11.5, but re-opened since). 57 62 - Some plugins seem to have a high impact on the performance, see ["TracDev/Performance/0.11.5#customizationsandplugins"]. 63 - Trac's [http://trac.edgewall.org/query?status=!closed&keywords=~performance performance issues]. 58 64 59 65 == Profiling a Trac request