Portal Home > Knowledgebase > Articles Database > two version of my.cnf, neither of them works for me


two version of my.cnf, neither of them works for me




Posted by renbinyan, 05-29-2007, 07:38 AM
Hi all, I got two version of my.cnf, but neither of them works ideally. On one hand, If i used the old one, the swap memory will be used out after 5-7 days running and system halt. On the other hand, the second copy of my.cnf will cause too much pain on cpu, even traffic is low, cpu could up to 70 or 80 percentage and hanging there for 1 minutes. I did a lots optimization in the past (including httpd.conf, my.cnf, sysctl.conf ), and found that the only problem left on my server would be my.cnf, I have to get it right this time!!! So I would be really appreciate if you guys can help me out. here is two copies of my.cnf: first one [mysqld] max_connections = 400 key_buffer = 64M myisam_sort_buffer_size = 32M join_buffer_size = 2M read_buffer_size = 2M sort_buffer_size = 3M table_cache = 1024 thread_cache_size = 286 thread_concurrency=2 interactive_timeout = 60 wait_timeout = 60 connect_timeout = 30 max_allowed_packet = 16M max_connect_errors = 10 query_cache_limit = 1M query_cache_size = 128M query_cache_type = 1 tmp_table_size = 48M [mysqld_safe] open_files_limit = 8192 [mysqldump] quick max_allowed_packet = 16M [myisamchk] key_buffer = 32M sort_buffer = 32M read_buffer = 16M write_buffer = 16M [mysqlhotcopy] interactive-timeout second one mysqld] skip-locking max_connections = 400 max_user_connections=300 interactive_timeout=60 key_buffer = 64M myisam_sort_buffer_size = 64M join_buffer_size = 2M read_buffer_size = 2M sort_buffer_size = 3M table_cache = 1024 record_buffer=2M thread_cache_size = 286 thread_concurrency=2 interactive_timeout = 60 wait_timeout = 60 connect_timeout = 30 max_allowed_packet = 16M max_connect_errors = 50 query_cache_limit = 4M query_cache_size = 128M query_cache_type = 1 tmp_table_size = 256M max_heap_table_size = 128M [mysqld_safe] open_files_limit = 8192 [mysqldump] quick max_allowed_packet = 16M [mysql] no-auto-rehash [isamchk] key_buffer = 256M sort_buffer_size = 256M read_buffer = 2M write_buffer = 2M [myisamchk] key_buffer = 256M sort_buffer = 256M read_buffer = 2M write_buffer = 2M Last edited by renbinyan; 05-29-2007 at 07:43 AM.

Posted by renbinyan, 05-29-2007, 08:09 AM
my server details: AMD sempton 3.0 , 1G Ram this is current free -m details, as you see, just after half days , the swap has been used . total used free Mem: 995 767 227 -/+ buffers/cache: 453 541 Swap: 2055 131 1923

Posted by x86brandon, 05-29-2007, 09:12 AM
Let it run for a good 24-48 hours, then run this script. http://www.day32.com/MySQL/tuning-primer.sh It will tell you what to do to your config and explain it to you.

Posted by fastnoc, 05-29-2007, 09:43 AM
I'd have a real hard time running arbitrary scripts from a website that points to nothing other than what the scripts do. There is no site at the root of that link. I'm sure it's just fine, but you'd be crazy to take that script and run in with that little bit of info. Just me though

Posted by renbinyan, 05-29-2007, 10:14 AM
thanks for reply, but I don't think tuning-premier will help, I run that script several days ago, and do what it says, still mysql used a lot cpu.

Posted by jNive, 05-29-2007, 10:16 AM
the script itself is well known, you can save it and check it yourself if you are suspicious or get it directly from a trusted source yourself, but indeed , someone could just make a malicious scripts, rename it as that, and then plonk a URL to it and say 'execute that' lol also, maybe your machine is just not powerful enough ? ( sempron + 1GB ram )

Posted by layer0, 05-29-2007, 10:32 AM
umm...http://www.day32.com/MySQL/

Posted by sirius, 05-29-2007, 10:47 AM
Moved to Technical and Security Issues.... Sirius

Posted by fastnoc, 05-29-2007, 10:56 AM
Dude if that's all it takes to make you happy to run a script off a dead site? I feel sorry for anyone that does business with you. And I'm very familiar with the script. so, ummm......



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Users online? (Views: 259)
VMware - Sound Card (Views: 292)
voxtreme and burstnet (Views: 272)