Hi Maximo, > How should I set my memory usage in my.cnf ???? I have a hard time > understanding how MySQL works with memory, how it manages it, etc. What > should I consider when setting my memory settings??? I have included a > paste of my.cnf > > # The MySQL server > [mysqld] > port = 3306 > socket = /tmp/mysql.sock > skip-locking > set-variable = key_buffer=128M
Try to increase the memory of key_buffer. I got 312M, my server has 1G of memory. > set-variable = max_allowed_packet=1M > set-variable = table_cache=256 You're doing use of join in your queries, the table_cache value must be something like number of max_connections * 2. Try table_cache=20000, will works fine. > set-variable = record_buffer=1M > set-variable = sort_buffer=1M > set-variable = net_buffer_length=16K > set-variable = myisam_sort_buffer_size=96M > set-variable = thread_cache=8 > set-variable = max_connections=500 max_connections is also very important, you must use many connections as your OS can handle, the increase of this value will optimize MySQL. Enjoy max_connections=10000 with table_cache=20000. Whe I changed this vars, my load average decreases from 30.0 or higher to 1.0/0.5 (and of course, creating indexes for all of my tables). []'s, -- + ----------------------------------------------------------- + | Fábio Berbert de Paula | [EMAIL PROTECTED] (from Rio) | | Linux Professional Institute Certified | ICQ: 6399331 | | www.vivaolinux.com.br -> porque nós amamos a liberdade ! | + ----------------------------------------------------------- + --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php