[rt-devel] Performance (was: Kill spam from mail)]

Jesse jesse at fsck.com
Fri May 11 09:05:10 EDT 2001


On Fri, May 11, 2001 at 11:17:37AM +0100, Mark Vevers wrote:
> > I probably wouldn't run it in production with less than a 500mhz cpu and 128
> > megs of ram in the box.  As I said though, there's ongoing performance work,
> > though it's not the highest priority thing going on.  Buying faster hardware
> > and sponsoring work on performance are both valid ways to deal with this.
> 
> I'm running RT on a dedicated dual 450MHz P3 with 512 Meg RAM, and performance
> seems to be slowing down considerably, especially when displaying long tickets.

There's a bunch of stuff that's untuned as of 1.3.70. I've put some time into
it in the past couple of days.  What I'm currently hacking on has several 
new indices that help considerably.   The next version of DBIx::Searchbuilder 
also has a couple of improvements that drastically improve performance.  

The two biggies are a much better Count method (when the search that's been
described hasn't yet been performed) and Matt Knopp's amazing new
DBIx::SearchBuilder::Record::Cachable, which caches Record objects pretty much
completely transparently.  

On my stress-test database (25,000 tickets) this took queries from > 5 minutes
to ~15 seconds. That's not as fixed as I'd like it, but it's definitely a start.



> We only have 36 in the database with a total of 121 attachments(just starting
> to use it in our backbone team)

How big are the attachments you're talking about?  I've not yet done extensive
testing with _large_ attachments.

> and building some of them can take ten seconds
> before the page starts displaying. I'm sure it's not the mysql server as if
> issue the SQL commands manually it's all sub 1 second.

As in you're copying all the SQL commands out of the mysql logs and manually
pasting them into the mysql monitor?

> From the cpu usage it all seems to be disappearing into apache, so I suspect
> it is all the perl/mod-perl code. 

That's kind of odd and runs counter to all my experiences.

> I haven't yet looked at the source yet, but
> (I'm probably teaching you to suck eggs here)  are you using one connection 
> for all the SQL queries or opening and closing each one. 

We keep a connection open.  Additionally, you should make sure that you have
a 'perlmodule Apache::DBI' in your httpd.conf.

> Also, are you using
> placeholders for getting the ticket contents as this means you can reuse your
> prepared SELECT statements.

We use placeholders (thanks to ivan) in the lookups stuff within Record.pm,
but Searchbuilder objects are not currently using placeholders...then again
the claim I've read is that pre-prepared SELECTS are not a speed issue with 
mysql (though they certainly help with pg and oracle)

-j

-- 
jesse reed vincent -- root at eruditorum.org -- jesse at fsck.com 
70EBAC90: 2A07 FC22 7DB4 42C1 9D71 0108 41A3 3FB3 70EB AC90

Pelcgb-serrqbz abj!




More information about the Rt-devel mailing list