[rt-users] Running /opt/rt4/sbin/rt-clean-sessions and general speed of rt.

hubert depesz lubaczewski depesz at depesz.com
Mon Jun 27 07:49:54 EDT 2011


Finally upgraded to 4.0.1. Works. But there are some issues:

Tried to test-run rt-clean-sessions and got:
=# /opt/rt4/sbin/rt-clean-sessions --older 7D
Can't locate object method "_CleariOldDir" via package "RT::Interface::Web::Session" at /opt/rt4/sbin/../lib/RT/Interface/Web/Session.pm line 173.

I'm using Apache::Session::File:

=# grep -i session /opt/rt4/etc/RT*Config*
/opt/rt4/etc/RT_Config.pm:=item C<$WebSessionClass>
/opt/rt4/etc/RT_Config.pm:C<$WebSessionClass> is the class you wish to use for managing
/opt/rt4/etc/RT_Config.pm:Sessions.  It defaults to use your SQL database, but if you are using
/opt/rt4/etc/RT_Config.pm:this line to F<RT_SiteConfig.pm> to prevent session corruption.
/opt/rt4/etc/RT_Config.pm:# Set($WebSessionClass, "Apache::Session::File");
/opt/rt4/etc/RT_Config.pm:By default, RT's user sessions persist until a user closes his or her
/opt/rt4/etc/RT_Config.pm:browser. With the C<$AutoLogoff> option you can setup session lifetime
/opt/rt4/etc/RT_Config.pm:By default, RT's session cookie isn't marked as "secure" Some web
/opt/rt4/etc/RT_SiteConfig.pm:Set( $WebSessionClass, 'Apache::Session::File' );

Also - Based on nginx logs with times, I see that 4.0.1 is much slower than 3.8.9
rendering home page took usually 0.7s, now it's > 3s:

some_ip - - [27/Jun/2011:13:18:48 +0200] "GET / HTTP/1.1" 200 1778 "-" "Mozilla/5.0 (X11; Linux i686 on x86_64; rv:6.0a2) Gecko/20110620 Firefox/6.0a2" 3.451s
some_ip - - [27/Jun/2011:13:29:19 +0200] "GET / HTTP/1.1" 200 4032 "-" "Mozilla/5.0 (X11; Linux i686 on x86_64; rv:6.0a2) Gecko/20110620 Firefox/6.0a2" 2.900s
some_ip - - [27/Jun/2011:13:29:45 +0200] "GET / HTTP/1.1" 200 4030 "http://rt.depesz.com/Ticket/Display.html?id=1517" "Mozilla/5.0 (X11; Linux i686 on x86_64; rv:6.0a2) Gecko/20110620 Firefox/6.0a2" 3.549s
some_ip - - [27/Jun/2011:13:33:10 +0200] "GET / HTTP/1.1" 200 4088 "http://rt.depesz.com/Ticket/Display.html?id=17472" "Mozilla/5.0 (X11; Linux i686 on x86_64; rv:6.0a2) Gecko/20110620 Firefox/6.0a2" 6.539s
some_ip - - [27/Jun/2011:13:34:30 +0200] "GET / HTTP/1.1" 200 4032 "http://rt.depesz.com/" "Mozilla/5.0 (X11; Linux i686 on x86_64; rv:6.0a2) Gecko/20110620 Firefox/6.0a2" 0.275s
some_ip - - [27/Jun/2011:13:35:41 +0200] "GET / HTTP/1.1" 200 4031 "http://rt.depesz.com/Ticket/Display.html?id=17588" "Mozilla/5.0 (X11; Linux i686 on x86_64; rv:6.0a2) Gecko/20110620 Firefox/6.0a2" 3.259s
some_ip - - [27/Jun/2011:13:40:10 +0200] "GET / HTTP/1.1" 200 4030 "-" "Mozilla/5.0 (X11; Linux i686 on x86_64; rv:6.0a2) Gecko/20110620 Firefox/6.0a2" 3.500s

Load on the server is ~ 0.7.

I checked DB logs, and the only thing I noticed was that I had calls to this query:

SELECT  * FROM Groups WHERE LOWER(Domain) = LOWER($1) AND LOWER(Type) = LOWER($2)

groups table on my system has ~ 70k rows, and runtime of the query is ~70ms.

So I added index on lower(domain), lower(type) and got the time to < 0.1ms

index definition, in case you'd want to add it to standard rt:

create index groups_3 on groups ( LOWER(Domain), LOWER(Type) );

But it's only ~ 70ms out of 3.5s.

Any hints on what should I look at?

Best regards,

depesz

-- 
The best thing about modern society is how easy it is to avoid contact with it.
                                                             http://depesz.com/



More information about the rt-users mailing list