HOWTO: Optimize MySQL 4.x

hehachris said:
i afraid that i dont have my.cnf @@

[root@server root]# cat /etc/my.cnf
cat: /etc/my.cnf: No such file or directory
If you don't have it, just create it and put in whatever options which you think is necessary then restart mysql ;)
 
hehachris said:
i afraid that i dont have my.cnf @@

[root@server root]# cat /etc/my.cnf
cat: /etc/my.cnf: No such file or directory

correct just make the file nano my.cnf paste the info in it save it. Then reboot mysql.
 
These tweaks are fantastic, the difference in speed was BLAM-O!!! The only question I have is, what general system spec are these tweaks based on? And is there a guide/rule for creating a my.cnf for a 2.8HT w/1GB ram?

Thanks everyone!
 
You need to look at your site again...

Warning: error_log(/home/innerear/domains/innerearaudio.com/logs/page_parse_time.log): failed to open stream: Permission denied in /home/innerear/domains/innerearaudio.com/public_html/catalog/includes/functions/database.php on line 41

Warning: error_log(/home/innerear/domains/innerearaudio.com/logs/page_parse_time.log): failed to open stream: Permission denied in /home/innerear/domains/innerearaudio.com/public_html/catalog/includes/functions/database.php on line 48

is repeated several times on the page http://www.innerearaudio.com/catalog/index.php

Regards,
Onno Vrijburg

PS. have you solved you loadtime problems yet?
 
Zero said:
These tweaks are fantastic, the difference in speed was BLAM-O!!! The only question I have is, what general system spec are these tweaks based on? And is there a guide/rule for creating a my.cnf for a 2.8HT w/1GB ram?

Thanks everyone!

This cnf file is for a server just as yours. Its for 2-3Ghz single processors with 1-2gigs of ram. You cange change alot of that stuff if you have a slower system, or even if you have a faster one. However this cnf is pretty well adaptable to most servers.
 
anyone here left out log-bin?

I recently removed it after it ended up using 30 gig hd space, I assume I have lost mysql database replication feature but otherwise looks fine.
 
I have left it out. I see no reason to have it. Its only for database replication as you say. Dunno. No need for it for me.
 
Hi!


Processor Name AMD Athlon(tm) XP 2600+
Vendor ID AuthenticAMD
Processor Speed (MHz) 1825.955
Total Memory 479648 kB
Free Memory 104492 kB
Total Swap Memory 1052248 kB
Free Swap Memory 1012652 kB


I must a optymalize my MySQL. Who help me?
 
I just did the optimization, and it helped alot. However, lately some of the queries have taken a long time to parse. I wen't into my.cnf again and doubled a few of the values (all of my sites on this server runs MySQL heavy sites, and some Exim and Apache services, which do not have a huge load - general server resource usage is around 0.4-0.8). However, this didn't help at all.

Is there any possibility that I might have gone overkill on my.cnf. I only have 1/2 GB of RAM, running a slow Celeron 2GHz. As long as I have a low server load, I can keep upping the values in my.cnf to get more MySQL cache, right?
 
Based on what you've written it's reasonable to presume you're running out of memory and your system is switching into swap memory.

If so, services will run extrmely slowly.

Jeff
 
Thanks!

I'm not sure about this. MySQL is usually running on around 4% of memory. CPU on the other hand is jumping up and down.
 
MySQL Optimization

I run big SQL websites on my servers. I would further like to add that I have a very limited knowledge on MySQL Optimization on SERVER Front. My server keeps crashing due to SQL load.

I made a my.cnf file as mentioned over here:
http://help.directadmin.com/item.php?id=44

But even then the server fails to handle the excessive load.

Someone suggested to increase and decrease the values like - query_cache_limit and query_cache_size.

What are the suggested settings for tweaking MySQL.

I have two servers:
----------------------------
1. AMD 64 3800, 1024MB RAM, CentOS 4.x, Direct Admin

2. AMD Sempron 2600/2048MB RAM, CentOS 4.x, Direct Admin

Thanks in Advance
 
Back
Top