Mysql database on FreeBSD 7 stuck in sbwait

Hi,

I'm running a mysql 5.1 server on FreeBSD 7.0 for drupal site with a fairly amount of traffic.

The database server runs fine until the webserver have about 14 page requests per second. Then the load goes down on the database server and it the process became stuck in the "sbwait" mode. Of course when this happens the responstime on the webpage are ridiculously high, sometimes more then 30 seconds.

Does anyone have a clue how to optimize this?

The hardware are not the bottleneck, the server have more than 2/3 of it's resources left when this happens.
 
Look at table locks, some tables benefit from running on InnoDB instead of MyISAM. Turn off the filesystem cache for the InnoDB tables. Also have a look at your slow_query log.
 
Did you gave mysqltuner / tuning-primer already a try to see if your MySQL configuration is ok ?

Additionally to the things said already :)
 
The strange thing are that mysql are really don't doing much.

If i constantly run "SHOW PROCESSLIST" I rarly hit more then two or three queries.

When i read about the "sbwait" state the information i found said that this state accur when i/o or network performance are lacking.

After running iostat my results indicate that the harddrive are not the problem.

I wonder if the tcp send/recvice buffer could be the problem?
 
SirDice said:
Look at table locks, some tables benefit from running on InnoDB instead of MyISAM. Turn off the filesystem cache for the InnoDB tables.

How does one "off the filesystem cache for the InnoDB tables" ?
 
Back
Top