php forum
php mysql forum
php mysql smarty
 
Page 1 of 2 1 2 >
Topic Options
#271518 - 03/26/04 04:47 PM How we solved 6.4.1 performance issues (long)
little_joe Offline
Member

Registered: 10/31/01
Posts: 209
Loc: Cleveland, Ohio
I chimed in on a few threads about 6.4.1 performance issues, I won't rehash that here except to say our forums were dead slow off and on. The past few weeks, we had to stop and restart MySQL every 12-18 hrs to clear out the processes as well. <br /> <br />I got great help from Jeremy's thread on Let's Tune MySQL in the MySQL forum here. Rick really stuck it out with us and was very patient and helpful. <br /> <br />Anyway, to get our 6.4.1 forums flying again, here's what I discovered. <br /> <br />First, log-bin was in our my.cnf. This writes every transaction to a flat file on disk - great for restoring in a disaster, terrible for server performance. Once removed, we got an immediate lift in the forums and on the server. <br /> <br />Second, 6.4.1 IMHO is very sensitive to a properly tuned my.cnf. Our 6.3.2 forums screamed w/ a near-stock my-large.cnf. In short, using Jeremy's thread to tweak ours, I solved the locked tables problem and significantly reduced server overhead. It required some experimenting with the key parameters in the file, but in the end it was time well spent. And I learned a lot. <br /> <br />Finally, we have another program bouncing against MySQL, phpAdsnew. The config of this program + bad entries in our my.cnf was causing MySQL to spawn new processes constantly and eventually hang. After reading up on this program and getting admin access, I found it had been configured to use persistent connections and there was no timeout on them. I disabled persistent connections Monday night, restarted MySQL, and our performance is as good as ever, server overhead is very low, and the MySQL stats are in that sweet spot. <br /> <br />So, thanks again Jeremy and especially Rick! and if anyone else is having problems with this version, you really need to use Jeremy's thread and understand your my.cnf and what's happening on your server. <br /> <br />(And now we are on 6.4.2, got our stickies fixed, and couldn't be happier!) <br /> <br />joe

Top
#271519 - 03/26/04 05:10 PM Re: How we solved 6.4.1 performance issues (long) [Re: JoshPet]
AllenAyres Offline

I type Like navaho

Registered: 03/10/00
Posts: 25580
Loc: Texas
Glad it's zipping for you now <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
- Allen wavey
- What Drives You?

Top
#271520 - 03/26/04 05:23 PM Re: How we solved 6.4.1 performance issues (long) [Re: JoshPet]
coloradok5 Offline
Enthusiast

Registered: 07/11/01
Posts: 462
Loc: Colorado
Great news<br />Are you getting locked files whenever a search is being perfomed? If no, I will be sending you a PM asking what your my.cnf settings are, I think your server specs are close to mine. <img src="http://www.ubbdev.com/forum/images/graemlins/bow.gif" alt="" />

Top
#271521 - 03/26/04 07:29 PM Re: How we solved 6.4.1 performance issues (long) [Re: bisbell]
little_joe Offline
Member

Registered: 10/31/01
Posts: 209
Loc: Cleveland, Ohio
We are not seeing any locked tables at all any longer. That was the biggest improvement, obviously.<br /><br />Here's the top part of our my.cnf, I think I still need to tweak it more, although our performance stats are nearly ideal. 1.8Ghz Intel, 1GB RAM, 60(?)GB HDD, RH7.3, MySQL3.23.55.<br /><br />*******<br /><br />skip-locking<br />set-variable = max_connections=150<br />set-variable = key_buffer=512M<br />set-variable = max_allowed_packet=1M<br />set-variable = table_cache=512<br />set-variable = sort_buffer=4M<br />set-variable = record_buffer=2M<br />set-variable = myisam_sort_buffer_size=64M<br />set-variable = thread_cache=8

Top
#271522 - 03/26/04 08:06 PM Re: How we solved 6.4.1 performance issues (long) [Re: JoshPet]
coloradok5 Offline
Enthusiast

Registered: 07/11/01
Posts: 462
Loc: Colorado
[quote<br />*******<br /><br />skip-locking<br />set-variable = max_connections=150<br />set-variable = key_buffer=512M<br />set-variable = max_allowed_packet=1M<br />set-variable = table_cache=512<br />set-variable = sort_buffer=4M<br />set-variable = record_buffer=2M<br />set-variable = myisam_sort_buffer_size=64M<br />set-variable = thread_cache=8 [/]<br /><br />Our servers are really close, I do have 2 gig of RAM also. Do you think I should raise my key_buffer?<br /><br />Here's what I have right now:<br /><br /># custom vars<br />set-variable = max_connections=200<br />set-variable = join_buffer=1M<br />set-variable = sort_buffer=4M<br />set-variable = thread_cache_size=50<br />set-variable = table_cache=1024<br />set-variable = key_buffer=64M<br />set-variable = max_connect_errors=10000<br />set-variable = max_allowed_packet=1M<br />set-variable = record_buffer=2M<br /><br /><br />What is skip-locking ?

Top
#271523 - 03/28/04 12:14 PM Re: How we solved 6.4.1 performance issues (long) [Re: bisbell]
donJulio Offline
Code Monkey

Registered: 06/17/02
Posts: 682
Loc: CA, USA
That's actually very interesting. I'm glad Jeremy is my host so he can fiddle with all the MySQL stuff for us <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
Too many men. There's too many people making too many problems, and not much love to go around. Can't you see this is the Land of Confusion? <img src="http://www.ubbdev.com/forum/images/graemlins/confused.gif" alt="" />

Top
#271524 - 03/28/04 03:21 PM Re: How we solved 6.4.1 performance issues (long) [Re: luan]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
<img src="http://www.ubbdev.com/forum/images/graemlins/bow.gif" alt="" /> Jeremy <img src="http://www.ubbdev.com/forum/images/graemlins/bow.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#271525 - 03/28/04 07:18 PM Re: How we solved 6.4.1 performance issues (long) [Re: bisbell]
little_joe Offline
Member

Registered: 10/31/01
Posts: 209
Loc: Cleveland, Ohio
I definitely think you should raise your key buffer.<br /><br />Do you have shell access to your server? If so, running some commands to get data is real easy.<br /><br />mysqladmin -u <mysqlusername> extended-status<br /><br />And post results here.

Top
#271526 - 03/28/04 10:27 PM Re: How we solved 6.4.1 performance issues (long) [Re: JoshPet]
coloradok5 Offline
Enthusiast

Registered: 07/11/01
Posts: 462
Loc: Colorado
When I run that command, I get:<br />mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111)'<br />Check that mysqld is running and that the socket: '/var/run/mysqld/mysqld.sock' exists!<br />-------------------<br />I can not locate mysqld.sock either so I will have to find out where my host has that info or where I can find it, nothing seems like it is located in a standard location, oh joy. <img src="http://www.ubbdev.com/forum/images/graemlins/crazy.gif" alt="" /><br /><br />Here is my current my.cnf settings:<br /><br />set-variable = max_connections=200<br />set-variable = join_buffer=1M<br />set-variable = sort_buffer=4M<br />set-variable = thread_cache_size=8<br />set-variable = table_cache=1024<br />set-variable = key_buffer=512M<br />set-variable = max_connect_errors=10000<br />set-variable = max_allowed_packet=1M<br />set-variable = record_buffer=2M<br /><br />It is runing quicker than it ever has I think but still getting locked files so not quite there yet, maybe drop table_cache down to 512 and see how it does.

Top
#271527 - 03/29/04 09:04 AM Re: How we solved 6.4.1 performance issues (long) [Re: bisbell]
msula Offline
Addict

Registered: 02/18/02
Posts: 1969
Loc: Lansing, Michigan
colorado, are you using MySQL 3.x or 4.x?

Top
#271528 - 03/29/04 06:44 PM Re: How we solved 6.4.1 performance issues (long) [Re: palmen]
RandyJG Offline
Junior Member

Registered: 03/11/03
Posts: 231
Loc: Canada
http://www.mysql.com/doc/en/Binary_log.html<br /><br />log-bin logs transactions that change, not all transactions.<br /><br />[]<br />Running the server with the binary log enabled makes performance about 1% slower.<br />[/]<br /><br />I wonder how true that actually is.

Top
#271529 - 03/30/04 02:00 PM Re: How we solved 6.4.1 performance issues (long) [Re: palmen]
coloradok5 Offline
Enthusiast

Registered: 07/11/01
Posts: 462
Loc: Colorado
I'm pretty sure it is 4.x, I will get a list of all my configuration for hardware/software together.

Top
#271530 - 03/30/04 02:44 PM Re: How we solved 6.4.1 performance issues (long) [Re: bisbell]
coloradok5 Offline
Enthusiast

Registered: 07/11/01
Posts: 462
Loc: Colorado
Arrg, looks like I am only on MYSQL 3.23.55, I will have them upgrade that.<br /><br /><br />> CPU<br />dual 800 MHz Pentium III processors<br /><br />> memory<br />2GB PC133 RAM<br /><br />Quantum Atlas IV 18GB SCSI boot and data drive<br />Maxtor 93073U6 30GB IDE backup drive<br /><br />> PHP version<br />4.3.4<br /><br />> MYSQL version<br />3.23.55 (though we can now upgrade to v4.0 if you desire)<br /><br />> Apache version<br />1.3.27<br /><br />> Linix version<br />Linux 2.2.19

Top
#271531 - 03/30/04 03:37 PM Re: How we solved 6.4.1 performance issues (long) [Re: bisbell]
msula Offline
Addict

Registered: 02/18/02
Posts: 1969
Loc: Lansing, Michigan
you really should upgrade to MySQL 4, there will be tremendous speed increases, as well as new caching features to really speed up larger and active databases.

Top
#271532 - 03/30/04 03:53 PM Re: How we solved 6.4.1 performance issues (long) [Re: palmen]
coloradok5 Offline
Enthusiast

Registered: 07/11/01
Posts: 462
Loc: Colorado
Will do, and all this time I thought I was on 4.0 <img src="http://www.ubbdev.com/forum/images/graemlins/crazy.gif" alt="" />

Top
#271533 - 03/31/04 08:36 AM Re: How we solved 6.4.1 performance issues (long) [Re: bisbell]
little_joe Offline
Member

Registered: 10/31/01
Posts: 209
Loc: Cleveland, Ohio
We are on the same version of MySQL. I too would like to upgrade. But it's been over a week now and it seems our erformance problems are solved for good. <fingers crossed>

Top
#271534 - 04/01/04 02:53 PM Re: How we solved 6.4.1 performance issues (long) [Re: palmen]
coloradok5 Offline
Enthusiast

Registered: 07/11/01
Posts: 462
Loc: Colorado
[]Jeremy said:<br />you really should upgrade to MySQL 4, there will be tremendous speed increases, as well as new caching features to really speed up larger and active databases. [/]<br /><br />OK, I am now on MYSQL 4 <img src="http://www.ubbdev.com/forum/images/graemlins/grin.gif" alt="" />

Top
#271535 - 04/01/04 09:15 PM Re: How we solved 6.4.1 performance issues (long) [Re: bisbell]
msula Offline
Addict

Registered: 02/18/02
Posts: 1969
Loc: Lansing, Michigan
notice any difference right off the bat?

Top
#271536 - 04/01/04 10:35 PM Re: How we solved 6.4.1 performance issues (long) [Re: palmen]
coloradok5 Offline
Enthusiast

Registered: 07/11/01
Posts: 462
Loc: Colorado
Lot less processes running out of the box, I'm still getting locked queries so will have to play around with the settings.

Top
#271537 - 04/02/04 06:09 PM Re: How we solved 6.4.1 performance issues (long) [Re: bisbell]
little_joe Offline
Member

Registered: 10/31/01
Posts: 209
Loc: Cleveland, Ohio
Welp, nevermind. <img src="http://www.ubbdev.com/forum/images/graemlins/frown.gif" alt="" /> Ours just completely melted down today, no rhyme or reason.<br /><br />I see MySQL gobbling up memory. Swap is relatively untouched. CPU cycles from 99% used to 99% idle.<br /><br />The forums will blaze, then crawl.<br /><br />Host says MySQL is the culprit. I have been tweaking my.cnf throughout the day, monitoring, and results are erratic.<br /><br />I am at wits' end with this. We got almost 2 weeks of superb performance, then hit the wall. :sighs:<br /><br />joe

Top
#271538 - 04/05/04 04:09 PM Re: How we solved 6.4.1 performance issues (long) [Re: bisbell]
navaho Offline
Veteran

Registered: 10/05/00
Posts: 2518
Loc: navahoville! :D
[]coloradok5 said:<br /><br />> Linix version<br />Linux 2.2.19 [/]<br /><br />ewwww. <img src="http://www.ubbdev.com/forum/images/graemlins/frown.gif" alt="" /><br /><br />You using RedHat 6.2 or something?
_________________________
Picture perfect penmanship here.

Top
Page 1 of 2 1 2 >



Moderator:  Deb 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks