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

Jesse jesse at fsck.com
Fri May 11 11:32:06 EDT 2001


On Fri, May 11, 2001 at 04:23:00PM +0100, Mark Vevers wrote:
> Jesse wrote
> > 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.  
> 
> Ok, just got your last CVS update for that

RT doesn't yet use Record::Cachable. you'll need to modify RT::Record.

> > 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.  
> 
> I've updated my CVS working directory and also patched the DB to match the
> latest Schema.  BTW Why do you create two indices each time?  The schema.pm
> defines one, but you translate that to create two as the INDEX (column1, 
> column2


It's an issue with older versions of DBIx::DBSchema related to how mysql
used to be broken.  It's fixed in ivan's CVS. I haven't had time to
suck it down and rerun the schema generation.

> It certainly seems to have helped.  Much snappier.

*grin* I'm glad. Most of what you're seeing is likely the Count(); fix.
That alone should help drastically with CPU usage.
 
> >> 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 experience.  
> > 
> I'll look at this in more detail if I get the time.

I'm definitely seeing some of this that I didn't before.


> > 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)
> 
> MySQL AB seem to think placeholders help. 

Inneresting. that's a change then. it used to be "Mysql ignores statement
precaching"

> Also something else I spotted, make upgrade splats config.pm.  Good job 
> I kept a backup copy ... ;-)

It should move the old one to config.pm.bak.

I'm actually right in the middle of another of what I hope will be a bigish
performance tweak with ACLs.  Long term, I'm going to need to drastically 
rewrite the ACL check routines, but for now, I think that I can get 
some fairly significant performance gains for most cases by flipping around 
the way we do ACL checks to cut out 3 sql queries per check for most cases
by adding an additional check in case of 'metagroup' rights. 

-j

> 
> Cheers
> Mark
> 

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

'"As the company that brought users the Internet, Netscape is now inviting 
the more than 60 million people who have used our client software to
'tune up' and upgrade to Netscape Communicator," said Mike Homer, 
senior vice president of marketing at Netscape.'  Sometimes I wonder.




More information about the Rt-devel mailing list