MySQL Forums
Forum List  »  Performance

Re: Server just hanging (More Information)
Posted by: Erin ONeill
Date: August 24, 2005 03:27PM

Hey Thomas -- sorry I've been busy at work or I would have given you some suggestions.

First off your variables are not really tweaked correctly. They're a bit off. Some tweaking will help.

I'm going to assume you're primarily using MyIASM tables and not innodb ones (phpBB uses MyIASM). The formula for your memory buffers is:
global buffers + (thread_buffers * max_connections).

Global buffers are key_buffer and Query_cache_size among others. Thread buffers are read, sort, join buffers. Your max connections are WAY too high. Our site is extremely busy but using mysqlreport (it's a perl script you can grab on the mysql site somewhere). It's told me the most connections at any one time has been 139. I set my max_connections to 300. I may lower this. I set my wait_timeout to 15 (I leave it the default high number on my development box, just lower it on my production box).

I'm not familar with the Mac X kernel, but you need to tweak your kernel settting for the following:

1. System limit on files & procs need to be raised if they are not unlimited as default (they are not on linux)
2. MySQL user limit on files & procs need to be raised (not as high as the system as the system needs some resources.).

I only know how to do this on solaris and linux. I've found Oracle installation docs to be the easiest and best laid out for doing this. Search for those.

Then once you've tweaked your kernel settings you can more safely raise some of your MySQL settings.

Table cache does NOT have an M and 50 isn't really very many. Remember that MySQL will open more than one file per table. It's the number of tables you want cached. My ulimit for mysql is not under my control. With the default Linux setup I can only have 1240 tables cached. I constantly keep all 1240 tables cached at all times. I am working on getting this setup so I can up this number. For my database based on the table cache formula ((2* AVG(# of tables in join)) * max_connections I should set this to 2400. My database screams when I set it this high and then crashes and burns because ulimits have been incorrectly setup for my user MySQL.

I also have 4 GB RAM and I have my key_buffer_size set up to be 396M. I'd like to put it up to 412 but I'm waiting for the ulimit to be raised. My query_buffer_cache_size is set to 164MB. I've working on tweaking my query_cache_limit size up w/o crashing my Server. I think your query_cache_limit is too high. That is a setting for EACH query. You might want to set it down to 16M to start??

phpBB is a poorly database designed bit of software. I've tried to talk Jay Pipes into tackling it but he just laughs at me! :) So we all have to suffer with it for the time being unless Felix or one of the other MySQL gurus will tackle it. I would start checking out the indexes that phpBB sets up. Besure that duplicate indexes are NOT being setup (i.e. a Primary key does not need an additional index set up on it, nor does a unique key. Duplicate indexes makes writes slow.

Can you post your show variables and your show status??

Hope this helps and isn't too late....
erin

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Server just hanging (More Information)
16218
August 24, 2005 03:27PM
8016
December 07, 2006 10:30AM
9392
September 23, 2005 01:56AM
4694
October 05, 2005 04:58AM
5847
October 05, 2005 11:49PM
5188
October 06, 2005 01:34AM
6410
October 06, 2005 04:57PM
6219
January 21, 2008 10:14AM
5639
January 21, 2008 10:53AM
5070
May 19, 2008 09:41AM
5324
February 05, 2008 10:27AM
5804
March 12, 2008 08:37AM
5908
November 14, 2008 12:31AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.