-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.

Soham Chakraborty
  • 3,534
  • 16
  • 24
Nick
  • 99
  • 1
  • 2
    enable slow query log to find what queries are slowing you down and causing a lot of disk access – Mike Sep 30 '12 at 04: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 '12 at 05: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 – DmitrySemenov Sep 30 '12 at 06:05

1 Answers1

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.

chx
  • 1,665
  • 1
  • 16
  • 25