-1

Recently my Debian Linux server has been experiencing slow web server response times. I've investigated and it seems that MySQL is the culprit, yet there are no slow queries indicated by the slow queries log and when I check SHOW FULL PROCESSLIST I have to be quick to see any queries that are actually running (due to the fact that they finish so quickly).

I've noticed that disk I/O speeds are significantly reduced when MySQL goes on these sprees of being slow. According to hdparm:

 Timing cached reads:   8012 MB in  2.00 seconds = 4009.64 MB/sec
 Timing buffered disk reads:   2 MB in  3.29 seconds = 623.18 kB/sec

When MySQL is disabled, buffered disk reads rise to about 120 MB/sec.

The bottom line is, what could be causing the heavy impact to general I/O speeds of other processes on the server? Does MySQL need some sort of optimization?

Thanks in advance for any suggestions.

3
  • 2
    enable slow query log to find what queries are slowing you down and causing a lot of disk access
    – Mike
    Sep 30, 2012 at 4:38
  • Few questions:What sort of disks are you running? Are you using MyISAM or Innodb? Are queries well indexed? Is the server swapping?
    – Noodles
    Sep 30, 2012 at 5:42
  • pls also share information about your infrastructure - physical server or VM? - amount of memory available - how many CPUs also pls run sar -u 1 for 10 secs and post output here. If sar is unavailable pls type yum install sysstat Sep 30, 2012 at 6:05

1 Answer 1

0

Do you happen to have the full query log enabled? check for log=/path/to/log in my.cnf and kill it if you have. It is possible that just writing the binlog is this slow but unlikely for a typical web application.

1
  • No, that's not enabled.
    – Nick
    Sep 30, 2012 at 13:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .