php forum
php mysql forum
php mysql smarty
 
Topic Options
#257937 - 08/31/03 09:58 PM Let's tune MySQL part II
msula Offline
Addict

Registered: 02/18/02
Posts: 1969
Loc: Lansing, Michigan
Ok, if you have followed the other thread about tuning MySQL, you are off to a great start! But I wanted to inform you of a few settings that after extensive testing has increased MySQL and overall server performance by over 50% <br /> <br />I have tested nearly every combination of my.cnf settings you can think of, and after reading more and more MySQL documentation I have found a few changes to make for those busy .threads sites with servers with 1 GB of ram or more run even faster. <br /> <br />If you have less RAM than 1GB, you may want to stick to the other settings I gave, but if you have 1GB+, this should help tremendously. <br /> <br />These are the settings you should have in your my.cnf file <br /> <br />
Code:
 <br />key_buffer=64M <br />table_cache=1024 <br />sort_buffer=4M <br />read_buffer_size=2M <br />
<br /> <br />These are the most important settings, and by giving them even more memory to work with, you should see your page load times increase dramaticaly as well as lower server loads. <br /> <br />One thing you may want to experiment with is the table_cache, it may work slightly better to run that at 512, but from my tests 1024 works great on a P4 server with 1 GB of ram and running a threads site with 50-90 users online and over 1200 posts per day. <br /> <br />So if you are still experiencing some slow loads and your server has some extra memory, this could easily help boost performance even a bit more <img src="/forum/images/graemlins/smile.gif" alt="" />

Top
#257938 - 09/09/03 12:29 PM Re: Let's tune MySQL part II [Re: palmen]
indy Offline
Newbie

Registered: 04/20/03
Posts: 10
Loc: Plauen, Germany
Another possibility helps MySQL running faster is to increase the size of the join buffer.<br /><br />So long...<br /><br />Indy
_________________________
-----
MySQL Cache Miss Rate: 0.0001 - that's it!

[]http://www.gnom.de/fun/barak_jones.gif[/]

Top
#257939 - 10/14/03 08:06 AM Re: Let's tune MySQL part II [Re: crablouse]
PhotoPost Offline
Hacker

Registered: 02/03/02
Posts: 989
I have two section that refer to the key_buffer: mysqld and myisamchk.<br /><br />In mysqld I have key_buffer set to 384M, is this excessive for a machine with 2GB of RAM (dual Xeon processors?)? In the myisamchk its set to 256M, again, excessive?
_________________________
[]http://www.danasoft.com/vipersig.jpg[/]
Viper Alley - http://www.viperalley.com
Extreme Fitness - http://www.extremefitness.com[/b]

Top
#257940 - 10/14/03 11:09 AM Re: Let's tune MySQL part II [Re: gailg]
msula Offline
Addict

Registered: 02/18/02
Posts: 1969
Loc: Lansing, Michigan
Well, myisamchk I believe is only used when repairing/optimizing tables, so the larger that value, the faster that process probably goes, so I don't think that is of much a concern. I haven't tested any different myisamchk values to be able to say for sure.<br /><br />As for key_buffer, that may be a little high, but it's hard to say depending on where the rest of your memory is being used throughout the system. I personally use 64MB and 128MB for some of my 1GB ram systems, and find that works fine. I have not experimented with much higher values.<br /><br />You may want to run a few comparisons, starting with 128M, checking server load, memory usage, and the mysql footprint, run a few intense queries and average the time. Then try 256M... do the same thing.. and again your current value, just to get a better idea as to what your system likes best.

Top
#257941 - 03/23/04 05:52 PM Re: Let's tune MySQL part II [Re: palmen]
coloradok5 Offline
Enthusiast

Registered: 07/11/01
Posts: 462
Loc: Colorado
[]Jeremy said:<br />Ok, if you have followed the other thread about tuning MySQL, you are off to a great start! But I wanted to inform you of a few settings that after extensive testing has increased MySQL and overall server performance by over 50%<br /><br />I have tested nearly every combination of my.cnf settings you can think of, and after reading more and more MySQL documentation I have found a few changes to make for those busy .threads sites with servers with 1 GB of ram or more run even faster.<br /><br />If you have less RAM than 1GB, you may want to stick to the other settings I gave, but if you have 1GB+, this should help tremendously.<br /><br />These are the settings you should have in your my.cnf file<br /><br />
Code:
<br />key_buffer=64M<br />table_cache=1024<br />sort_buffer=4M<br />read_buffer_size=2M<br />
<br /><br />These are the most important settings, and by giving them even more memory to work with, you should see your page load times increase dramaticaly as well as lower server loads.<br /><br />One thing you may want to experiment with is the table_cache, it may work slightly better to run that at 512, but from my tests 1024 works great on a P4 server with 1 GB of ram and running a threads site with 50-90 users online and over 1200 posts per day.<br /><br />So if you are still experiencing some slow loads and your server has some extra memory, this could easily help boost performance even a bit more <img src="/forum/images/graemlins/smile.gif" alt="" /> [/]<br /><br />Jeremy<br />What did you use for max_connections?

Top
#257942 - 03/24/04 10:42 AM Re: Let's tune MySQL part II [Re: bisbell]
little_joe Offline
Member

Registered: 10/31/01
Posts: 209
Loc: Cleveland, Ohio
FWIW with peak users of 250, regularly at 150 users online, plus hundreds more hitting our non-forum pages and another application (phpAdsNew - serving ads on eveyr page we deliver) hitting MySQL, our max connections to MySQL from extended-status is 79. I set our max connections in my.cnf to 150, and we're nowhere near that limit. The default is 100.

Top


Top Posters Last 30 Days
AllenAyres 82
Gizmo 29
sirdude 25
Zarzal 23
blaaskaak 12
swebs 6
willing 5
Who's Online
1 Registered (M4D), 34 Guests and 8 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
User Authentication Class
by sirdude
Today at 06:11 PM
Multiple Identity Detector
by Myke
Today at 05:45 AM
FlashChat with UBB.Threads 7.0.2
by Gizmo
Today at 12:30 AM
Nice Ajax Chat
by Thelockman
07/06/08 09:07 AM
[7.x] UBB.Post Templates v0.1
by sirdude
07/05/08 12:48 PM
Team UBBDev Rides Again!
by AllenAyres
07/04/08 10:56 PM
[7.3.x] ubb.links
by AllenAyres
07/03/08 06:15 PM
New Mods
Protect users emails
by Basil Fawlty
06/29/08 08:44 AM
[7.3.x] Scheduled board close for backup
by blaaskaak
06/26/08 04:01 AM
[7.3+] CustomTag - Audo Embedding
by Gizmo
06/24/08 07:52 PM
[7.3.x] ubb.links
by AllenAyres
06/20/08 11:50 PM
[7.3] Dissallow quotes more then 3 levels deep
by blaaskaak
06/09/08 09:01 AM
Newest Members
nunny, lpzie, DoubleDutch, ryzilla, M4D
13305 Registered Users

 

 

 
fusionbb message board php hacks