LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-11-2008, 03:19 AM   #1
i_nomad
Member
 
Registered: Mar 2008
Distribution: RedHatES4
Posts: 144

Rep: Reputation: 15
Mysql slow Query_time


My problem: My radius servers that are linked to mysql databases are locking (requires start of service)every day.
Now I am trying to understand if there is a mysql problem that is impacting on the radius service in some way.

I have set up the slow query log. I would like some clarification from someone on the findings. Is there something I can do to investigate these slow responses

# User@Host: x[x] @ [. . .]
# Query_time: 4 Lock_time: 0 Rows_sent: 16208 Rows_examined: 32416
SELECT `radacct`.`RadAcctId`, `radacct`.`ts` FROM `radacct` `radacct` ORDER BY `radacct`.`ts`;
/usr/libexec/mysqld, Version: 4.1.22-log. started with:
Tcp port: 3306 Unix socket: /var/lib/mysql/mysql.sock
Time Id Command Argument
# Time: 081111 8:05:10
# User@Host: x[x] @ [. . .
# Query_time: 11 Lock_time: 0 Rows_sent: 16245 Rows_examined: 48767
use radius;
SELECT `ts` ,`UserName` ,`AcctQoS` ,SUM(`AcctInputOctets` ) ,SUM(`AcctInputPackets` ) FROM `radacct` GROUP BY `ts` ,`UserName` ,`AcctQoS`;
# Time: 081111 8:05:38
# User@Host: x[x] @ [. . .]
# Query_time: 2 Lock_time: 0 Rows_sent: 20546 Rows_examined: 20546
SELECT `radpostauth`.`id` FROM `radpostauth`;
# Time: 081111 8:06:12
# User@Host: x[x] @ [. . . ]
# Query_time: 11 Lock_time: 0 Rows_sent: 0 Rows_examined: 0
SELECT `ts` ,`UserName` ,`AcctQoS` ,SUM(`AcctInputOctets` ) ,SUM(`AcctInputPackets` ) FROM `radacct` GROUP BY `ts` ,`UserName` ,`AcctQoS`;
# Time: 081111 8:06:38
# User@Host: x[x] @ [. . . ]
# Query_time: 5 Lock_time: 0 Rows_sent: 16277 Rows_examined: 32554
SELECT `radacct`.`RadAcctId`, `radacct`.`ts` FROM `radacct` `radacct` ORDER BY `radacct`.`ts`;
# Time: 081111 8:10:15


I have also run the TUNING PRIMER and have some results from this..

Last edited by i_nomad; 11-11-2008 at 04:24 AM.
 
Old 11-11-2008, 08:09 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.x
Posts: 18,442

Rep: Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791Reputation: 2791
What exactly are the log msgs re 'locking'? Does it say the db is hung ?
BTW, those queries you've shown don't seem to use a WHERE clause, so you're selecting a lot of rows, which will only get bigger/slower as time goes by.
You need to SELECT by userid or something of that ilk. Needs to be an indexed column.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mysql slow on good hardware neocontrol Linux - Server 1 08-28-2007 06:38 PM
Connection to MySQL very slow wineo Linux - Newbie 2 06-17-2005 09:41 AM
Slow machine; mysql ShuGos Linux - Software 0 06-15-2005 04:22 AM
Slow PHP+MySQL on RH9 tomazu Red Hat 0 01-01-2004 09:29 AM
MySQL Slow... Wolverine Linux - General 0 04-05-2002 07:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration