I’m hoping someone from this forum to help me quick solve our server problem.
Long story short, our old DB admin/designer leave our company last year. And since then we don’t really have a DB admin.
Which is fine, at least the server is running all good without him till few weeks ago. All the queues takes 10 to 20 times longer to get get result.
I’m guessing the config need some kind of fine tune after a year.
Please feel free to let us know what we need to do.
Thank you!
The server is still on a P4 631 with 2G ram. Linux 2.4.20-8. MySQL 3.23
About 4G data, tables range from 300MB to 1MB.
Read/Write ratio is 0.002
MyISAM
Here’s the setting:
[B]Quote:[/B]
# The MySQL server
[mysqld]
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
set-variable = key_buffer=384M
set-variable = max_allowed_packet=3M
# Modified on 2007-10-23
#set-variable = max_allowed_packet=1M
set-variable = table_cache=512
set-variable = sort_buffer=2M
set-variable = record_buffer=2M
set-variable = thread_cache=8
# Try number of CPU's*2 for thread_concurrency
set-variable = thread_concurrency=8
set-variable = myisam_sort_buffer_size=64M
#log-bin
server-id = 1
Uptime is low, because the cornjob resstart mysqld every night.
I’m thinking the other possible reason we have that many slow_queries is because our hard drive is not the DMA mode is not on after a reset… but not 100% confirmed yet.
Or maybe it was never on since day one…
[B]Quote:[/B]
# /sbin/hdparm -d1 /dev/hdc
/dev/hdc:
setting using_dma to 1 (on)
HDIO_SET_DMA failed: Operation not permitted
using_dma = 0 (off)
Your server has only run 71137 queries. It’s pretty lightly loaded. However, a lot of the queries it’s running are forcing full table scans because of lacking indexes. Select_range and Select_scan show that over 14,000 queries required table scans – meaning part or all of the table had to be read to satisfy the query. This probably occured quickly when there wasn’t much data, but as the tables got larger, this has taken more and more time.
You need to look at the queries being run and figure out how to add the appropriate indexes. If you enable the MySQL slow log, it’s a good place to start looking.