Hi, I've been trying to figure out that causing the memory usage issues I noticed while moving t.e.o to trunk. Since this seems to be limited to larger trac installations I created a new environment only laptop and inserted 5000 (t.e.o has almost 7000 tickets) new tickets [1].
With this amount of tickets the performance is pretty terrible for some pages. Take "/report/1" for example, on my laptop it takes about 33 seconds to generate 4.7MB of HTML. What's even worse is that the trac process' memory footprint (resident) balloons to around 220MB. As far as I can tell most of this memory is used by Genshi while serializing the template during the "stream.render()" method call in chrome.py. I've created a linux-only patch[2] which monitors the resident memory footprint before and after the "stream.render()" call. Four consecutive "/report/1" requests gives the following output: before render(): 51888 kB after render(): 209456 kB before render(): 208936 kB after render(): 221792 kB before render(): 222040 kB after render(): 222128 kB before render(): 222128 kB after render(): 222128 kB And since python 2.5.2 never seems to return "free" and garbage collected memory back to the operating system this memory is bound to this particular process until it is restarted. This is bad news for people running multiple long running processes since after a while all processes will have allocated enough ram for the most expensive page. So far I've been unable to find a way to minimize the memory usage of genshi's serialization step. But unless we find any way to do that I'm afraid we might have to consider paging or some other technique to avoid these expensive pages. Cheers, Jonas [1]: http://pastebin.com/fc653f04 [2]: http://pastebin.com/f50ce659b --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Development" 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-dev?hl=en -~----------~----~----~----~------~----~------~--~---
