====== MySQL ====== ===== Оптимизация MySQL (Low Memory) ===== http://itbg.davnozdu.ru/?p=486 __Минимальный конфиг [my.cnf]:__ # Main MySQL server options [mysqld] port = 3306 socket = /var/run/mysqld/mysqld.sock # # No locking at all! skip-locking # # Set internal buffers, caches and stacks very low key_buffer = 16K max_allowed_packet = 16K table_cache = 1 sort_buffer_size = 16K read_buffer_size = 16K read_rnd_buffer_size = 1K net_buffer_length = 1K thread_stack = 16K # # Don’t listen on a TCP/IP port at all. # Will still work provided all access is done via localhost skip-networking server-id = 1 # # Skip Berkley and Inno DB types skip-bdb skip-innodb # # Set the query cache low query_cache_limit = 1048576 query_cache_size = 1048576 query_cache_type = 1 # # Set various memory limits very low, disable memory-hogging extras [mysqldump] quick max_allowed_packet = 16K [mysql] no-auto-rehash [isamchk] key_buffer = 16K sort_buffer_size = 16K [myisamchk] key_buffer = 16K sort_buffer_size = 16K [mysqlhotcopy] interactive-timeout __Оптимизированный конфиг:__ [mysqld] datadir=/var/lib/mysql socket=/tmp/mysql/mysql.sock user=mysql port = 3306 bind-address = 127.0.0.1 # No locking at all! skip-locking # Set internal buffers, caches and stacks very low key_buffer = 16K max_allowed_packet = 16K table_cache = 1 sort_buffer_size = 16K read_buffer_size = 16K read_rnd_buffer_size = 1K net_buffer_length = 1K thread_stack = 16K # Don’t listen on a TCP/IP port at all. # Will still work provided all access is done via localhost skip-networking server-id = 1 # Skip Berkley and Inno DB types skip-bdb skip-innodb # Set the query cache low query_cache_limit = 500K query_cache_size = 3M query_cache_type = 1 # Set various memory limits very low, disable memory-hogging extras [mysqldump] quick max_allowed_packet = 16K [mysql] no-auto-rehash [isamchk] key_buffer = 16K sort_buffer_size = 16K [myisamchk] key_buffer = 16K sort_buffer_size = 16K [mysqlhotcopy] interactive-timeout