Group.Name NULL (~performace)

Hi,

I’m trying to drill to the bottom of why my RT performance is really
sluggish and it burns out nearly all of my CPU (on a 4 CPU solaris
box!!!). As i was looking around through the mysql tables i found out i
have a bunch of groups with NULL name or just empty string. The
situation is like this:

mysql> select count(id) from Groups where Name like ‘%’;
| count(id) |
| 188 |
1 row in set (0.03 sec)

Of these, 7 are empty strings:

mysql> select count(id) from Groups where Name=’’;
| count(id) |
| 7 |
1 row in set (0.02 sec)

and 157 are a “User nnn” type:

mysql> select count(id) from Groups where Name like ‘User %’;
| count(id) |
| 157 |
1 row in set (0.03 sec)

And the NULLs are 3639-188=3451!!!

mysql> select count(id) from Groups;
| count(id) |
| 3936 |
1 row in set (0.02 sec)

Shit. Is this normal?? I have a feeling my DB is all messed up. The page
loads take a long time and the main reason that I’ve stumbled on this
Groups thing is that i have a test user and i couldn’t deassign him from
one group - it would timeout and the CPU just went ^^^…So I had to
delete him from group membership by hand…

Are there any DB sanity tools/checks one could try or just some schema
to recreate the db anew and in sane state?

I’m running rt 3.0.11 on solaris8 and mysql 4.0.18, apache 1.3.29,
modperl 1.29 but also tried apache2 (2.0.49) with fastcgi (2.4.0) but
was constantly getting errors and stack dumps, so I switched back
yesterday…

Any suggestions?
Anything is appreciated :wink:

Thanx
Jure

Jure Simsic wrote:

Hi,

I’m trying to drill to the bottom of why my RT performance is really
sluggish and it burns out nearly all of my CPU (on a 4 CPU solaris
box!!!). As i was looking around through the mysql tables i found out i
have a bunch of groups with NULL name or just empty string. The
situation is like this:

[snip]

read this
http://wiki.bestpractical.com/?Group
try next query to better understand what this groups mean:
mysql> select Domain, Type, count(1) from Groups GROUP BY Domain, Type;

Shit. Is this normal?? I have a feeling my DB is all messed up. The page
loads take a long time and the main reason that I’ve stumbled on this
Groups thing is that i have a test user and i couldn’t deassign him from
one group - it would timeout and the CPU just went ^^^…So I had to
delete him from group membership by hand…
To help developers you should collect debug info about where it sucks:

  1. mysql> show full processlist;
  2. MySQL full query log;
  3. RT log;
  4. more info
    We have 1CPU and RT with >100k tickets, 90k users, 400k records in
    Groups table and everything is fine with user management.

Are there any DB sanity tools/checks one could try or just some schema
to recreate the db anew and in sane state?
You can try to apply constraints.mysql file to your DB copy.