 |
 |
 |
 |
#257937 - 08/31/03 09:58 PM
Let's tune MySQL part II
|
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 /> <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
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#257940 - 10/14/03 11:09 AM
Re: Let's tune MySQL part II
[Re: gailg]
|
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]
|
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 /> <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
|
|
|
|
 |
 |
 |
 |
|
|