On Sep 24, 12:49 am, Timm Essigke <[email protected]> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Dear Trac users, > > we are happily using trac for our Intranet since a while. Generally > performance is fine, but the blog module is very slow and we have the > feeling it is getting slower over time. > > I narrowed down the problem by some extra debug lines: > > 2009-09-23 16:24:11,276 Trac[model] DEBUG: TE: get_blog_posts() SQL 116: > 'SELECT bp1.name, bp1.version, bp1.publish_time, bp1.author, bp1.title, > bp1.body, bp1.categories FROM fullblog_posts bp1 ,(SELECT name, > max(version) AS ver FROM fullblog_posts GROUP BY name) bp2 WHERE > bp1.version = bp2.ver AND bp1.name = bp2.name ORDER BY bp1.publish_time > DESC' (None) > 2009-09-23 16:24:11,455 Trac[model] DEBUG: TE: get_blog_posts() SQL: > query finished > 2009-09-23 16:24:11,467 Trac[model] DEBUG: TE: get_blog_posts(): returning > 2009-09-23 16:24:30,565 Trac[session] DEBUG: Retrieving session for ID > u'[email protected]' > > The method get_blog_post is in > /usr/lib/python2.5/site-packages/TracFullBlogPlugin-0.1-py2.5.egg/tracfullblog/model.py. > First, I was suspecting the SELECT statement to take about 20 sec, but > by adding some extra debug lines it turned out to be fast. Instead trac > blocks after leaving the method, but I don't know how to debug python > code inside apache (e.g. get a call graph or run pdb). Can anybody tell > me what is done before the "Retrieving session" debug message is given? > > I saw that about 200 MB of NFS traffic are transferred within the 20 sec > between the NFS server hosting the trac projects and the trac server. > Why so much data needs to pass the network? My trac.db is only 3.4 MB - > what else is required? > Usually, NFS is ten times faster in my setup (at least for large files). > Googleing was not helpful... > > Here is my system information: > Trac: 0.11.5 > Python: 2.5.4 (r254:67916, Feb 18 2009, 03:17:34) [GCC 4.3.3] > setuptools: 0.6c9 > SQLite: 3.6.17 > pysqlite: 2.3.2 > Genshi: 0.6dev-r999 > mod_python: 3.3.1 > jQuery: 1.2.6 > > Thanks in advance! > > Timm
Hard to tell really without knowing the exact request you make, what data you have, db backend, what other plugins and security policies may be in place, site.html and whatever else may affect page generation. The anatomy of a request is generally quite simple: find the module (blog), have module process the request and collect the data it needs (part of what you debug), and render the template using the data provided. Intermixed in this is various calls to check permissions +++. I've got some scripts i use to profile requests, so perhaps you can ping me on #trac IRC channel (I'm 'osimons') and we can try to debug/ profile your setup and see if anything interesting shows up? :::simon https://www.coderesort.com http://www.ohloh.net/accounts/osimons --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/trac-users?hl=en -~----------~----~----~----~------~----~------~--~---
