PDA

View Full Version : Mysql database on FreeBSD 7 stuck in sbwait


nfm
January 30th, 2009, 12:00
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.

SirDice
January 30th, 2009, 13:21
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.

r-c-e
January 30th, 2009, 18:03
What does SHOW PROCESSLIST show you when this is happening?

rghq
January 30th, 2009, 22:57
Did you gave mysqltuner / tuning-primer already a try to see if your MySQL configuration is ok ?

Additionally to the things said already :)

nfm
February 2nd, 2009, 12:38
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?

dfso
September 24th, 2011, 00:43
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" ?