LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-15-2007, 10:32 PM   #16
p_s_shah
Member
 
Registered: Mar 2005
Location: India
Distribution: RHEL 3/4, Solaris 8/9/10, Fedora 4/8, Redhat Linux 9
Posts: 237
Blog Entries: 1

Rep: Reputation: 34

Hello Again,

Link for mysql slow log parser :
http://www.retards.org/projects/mysql/
http://www.mysqlperformanceblog.com/...low_log_parser
Usage : mysql_slow_log_parser <logfile>

Also check the description on first link for basic info.

Check if any particular query is taking too much time. If yes, try to resolve the issue like size of table or poor indexing.
 
Old 07-17-2007, 04:16 AM   #17
lavinya
LQ Newbie
 
Registered: Jun 2007
Location: istanbul
Posts: 21

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by p_s_shah
Hello Again,

Link for mysql slow log parser :
http://www.retards.org/projects/mysql/
http://www.mysqlperformanceblog.com/...low_log_parser
Usage : mysql_slow_log_parser <logfile>

Also check the description on first link for basic info.

Check if any particular query is taking too much time. If yes, try to resolve the issue like size of table or poor indexing.
thanks thanks for reply.

It must be like this?

Code:
[mysqld]
set-variable=local-infile=0
key_buffer_size=20M
connect_timeout=8
interactive_timeout=10
join_buffer_size=2.00M
max_allowed_packet=3M
max_connections=500
max_connect_errors=10
myisam_sort_buffer_size=4M
read_buffer_size=2M
read_rnd_buffer_size=2M
sort_buffer_size=2M
table_cache=2000
concurrent_insert=2
thread_cache_size=8
thread_concurrency=4
wait_timeout=8
query_cache_size=4M
query_cache_limit=1M
query_cache_type=1
default-character-set=latin1
log-slow-queries=/var/log/mysql-slow.log
mysql_slow_log_parser=/var/log/mysql-slow.log
long_query_time = 5
how can we use http://www.retards.org/projects/mysq...low_log_parser
if you answer I will be happy.
 
Old 07-17-2007, 11:07 PM   #18
p_s_shah
Member
 
Registered: Mar 2005
Location: India
Distribution: RHEL 3/4, Solaris 8/9/10, Fedora 4/8, Redhat Linux 9
Posts: 237
Blog Entries: 1

Rep: Reputation: 34
Remove following line from /etc/my.cnf :
mysql_slow_log_parser=/var/log/mysql-slow.log

Either download the script from given links or simply copy/paste complete script to a text file and save it to mysql_slow_log_parser.
mysql_slow_log_parser is used to parse output of your /var/log/mysql-slow.log [ Or say file specified by log-slow-queries directive. ]

Run it from command prompt by :
mysql_slow_log_parser /var/log/mysql-slow.log

Your query time should not be higher. If the query time is higher try to optimize query by :
1. Deleting old records after taking proper backup to reduce table size.
2. Indexing.

File /var/log/mysql-slow.log should look something like :
Code:
use <dbname>;
UPDATE <tablename> SET time_average='433' WHERE page='332';
# Time: 061120 13:12:21
# User@Host: <user>[<user>] @ localhost []
# Query_time: 3  Lock_time: 0  Rows_sent: 0  Rows_examined: 0

Last edited by p_s_shah; 07-17-2007 at 11:08 PM.
 
Old 11-30-2007, 09:38 AM   #19
lavinya
LQ Newbie
 
Registered: Jun 2007
Location: istanbul
Posts: 21

Original Poster
Rep: Reputation: 15
Unhappy

I installed latest version tuning-primer.sh
After 48 hours run:

#tuning-primer.sh

RESULT:

All values "...seems to be fine." Green colour(No problem)

But this pictures RED, ORANGE colour (warning)
(JOINS TAB, KEY BUFFER TAB, QUERY CACHE TAB)

http://img529.imageshack.us/img529/1565/50222905yb1.png
http://img57.imageshack.us/img57/2536/20300450yc0.png


How to optimizing values of RED, ORANGE lines?

I have;
P 6600 Core2Duo FS
4096 MB DDR2
2x250 GB SATAII
Plesk 8.2.1 Linux
Centos 5.0
system full up to date
And i have 10 websites, (AVARAGE today unique visitors: 25.000-35.000 and 2.000.000 - 3.000.000 hits)
APF, Plesk firewall, mod_evasive...

Please help me. Thanks.
 
Old 12-01-2007, 11:40 AM   #20
tanveer
Member
 
Registered: Feb 2004
Location: e@rth
Distribution: RHEL-3/4/5,Gloria,opensolaris
Posts: 525

Rep: Reputation: 37
Hi,
I used to get a similiar sort of problem a month back, the same mysql error. My CPU Usage was constantly showing 99.9%. I did a lot of changing in my.cnf parameters but nothing worked. Finally the problem find out was on the developer side. They did a mistake in their coding. After correction, application is working just fine till today.
 
Old 12-01-2007, 03:04 PM   #21
lavinya
LQ Newbie
 
Registered: Jun 2007
Location: istanbul
Posts: 21

Original Poster
Rep: Reputation: 15
Unhappy

Thanks for reply tanveer.
But how to solved my problem?

Quote:
Originally Posted by lavinya View Post
I installed latest version tuning-primer.sh
After 48 hours run:

#tuning-primer.sh

RESULT:

All values "...seems to be fine." Green colour(No problem)

But this pictures RED, ORANGE colour (warning)
(JOINS TAB, KEY BUFFER TAB, QUERY CACHE TAB)

http://img529.imageshack.us/img529/1565/50222905yb1.png
http://img57.imageshack.us/img57/2536/20300450yc0.png


How to optimizing values of RED, ORANGE lines?

I have;
P 6600 Core2Duo FS
4096 MB DDR2
2x250 GB SATAII
Plesk 8.2.1 Linux
Centos 5.0
system full up to date
And i have 10 websites, (AVARAGE today unique visitors: 25.000-35.000 and 2.000.000 - 3.000.000 hits)
APF, Plesk firewall, mod_evasive...

Please help me. Thanks.
 
  


Reply

Tags
high, load


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
Server Load Times High, help? Networks Linux - Newbie 6 05-05-2007 12:37 AM
Load Avg High/Phys Mem High teamh Debian 2 12-26-2006 05:03 PM
Server high load, testing hardware reliability and limiting process stelar Linux - Enterprise 1 10-20-2006 12:58 AM
High server load problem eagletalontim Linux - General 5 01-12-2006 10:42 AM
ftp server high cpu load littleking Slackware 1 11-24-2003 03:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:40 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