Dave Johnson on open web technologies, social software and software development
« Erik Hatcher on... | Main | Software success. »
I've been working on improving the performance of the Roller persistence tier. I've been doing this work in the old Roller 0.9.7 branch to make it easy for FreeRoller to deploy the improvements. Here are some details on the improvements.
Roller uses an O/R mapping framework persist objects in a relational database. Before the improvements, every call into the Roller persistence layer would open, use, and close a persistence session (either a Hibernate Session or a Castor Database). Roller often makes multiple persistence layer calls to process a web request and, so, Roller would often open, use, and close multiple persistence sessions per web request. A number of people pointed out that this is a bad thing.
To fix this problem, I changed Roller to ensure that each incoming web request gets it's very own persistence session and all persistence layer calls made on behalf of that request use that same persistence session. That means that there is, at most, one persistence session per incoming request. Persistence sessions don't hang around, each one lasts for the duration of one web request only.
These change improved Roller's performance, but not by much. Here are the JMeter test results. As always, comments, suggestions, and criticisms welcome. I think it is interesting that Resin performed better than Tomcat on the baseline test, but not the Roller test (a sign that I screwed something up?).
Update: FreeRoller is deploying these changes now. Even though the performance gains are minimal, I'm hoping the load and the number of MySQL threads will be reduced. I'll be playing with Hibernate caching and the new OSCache beta release tonight to see if they can offer any additional improvements.
Dave Johnson in Roller
06:13PM Aug 03, 2003
Comments [3]
Tags:
Roller
« Erik Hatcher on... | Main | Software success. »
This is just one entry in the weblog Blogging Roller. You may want to visit the main page of the weblog
Below are the most recent entries in the category Roller, some may be related to this entry.
Posted by Bo on August 04, 2003 at 06:11 AM EDT #
Posted by Lance on August 05, 2003 at 05:38 PM EDT #
Posted by Lance on August 05, 2003 at 05:39 PM EDT #