MySQLÐÔÄÜÓÅ»¯µÄ²ÎÊý¼ò½é(2)

À´Ô´£ºÎ´Öª ÔðÈα༭£ºÔðÈα༭ ·¢±íʱ¼ä:2014-05-26 11:01¡¡µã»÷:´Î

table_cache = 512
thread_cache_size = 64
query_cache_size = 64M
#Ö¸¶¨MySQL²éѯ»º³åÇøµÄ´óС¡£¿ÉÒÔͨ¹ýÔÚMySQL¿ØÖÆ̨¹Û²ì£¬Èç¹ûQcache_lowmem_prunesµÄÖµ·Ç³£´ó£¬Ôò±íÃ÷¾­³£³öÏÖ»º³å²»¹»µÄÇé¿ö£»Èç¹ûQcache_hitsµÄÖµ·Ç³£´ó£¬Ôò±íÃ÷²éѯ»º³åʹÓ÷dz£Æµ·±£¬Èç¹û¸ÃÖµ½ÏС·´¶ø»áÓ°ÏìЧÂÊ£¬ÄÇô¿ÉÒÔ¿¼ÂDz»Óòéѯ»º³å£»Qcache_free_blocks£¬Èç¹û¸ÃÖµ·Ç³£´ó£¬Ôò±íÃ÷»º³åÇøÖÐËéƬºÜ¶à¡£
tmp_table_size = 256M
max_connections = 768
#Ö¸¶¨MySQLÔÊÐíµÄ×î´óÁ¬½Ó½ø³ÌÊý¡£Èç¹ûÔÚ·ÃÎÊÂÛ̳ʱ¾­³£³öÏÖToo Many ConnectionsµÄ´íÎóÌá ʾ£¬ÔòÐèÒªÔö´ó¸Ã²ÎÊýÖµ¡£
max_connect_errors = 10000000
wait_timeout = 10
#Ö¸¶¨Ò»¸öÇëÇóµÄ×î´óÁ¬½Óʱ¼ä£¬¶ÔÓÚ4GB×óÓÒÄÚ´æµÄ·þÎñÆ÷¿ÉÒÔÉèÖÃΪ5-10¡£
thread_concurrency = 8
#¸Ã²ÎÊýȡֵΪ·þÎñÆ÷Âß¼­CPUÊýÁ¿*2£¬ÔÚ±¾ÀýÖУ¬·þÎñÆ÷ÓÐ2¿ÅÎïÀíCPU£¬¶øÿ¿ÅÎïÀíCPUÓÖÖ§³ÖH.T³¬Ị̈߳¬ËùÒÔʵ¼ÊȡֵΪ4*2=8
skip-networking
#¿ªÆô¸ÃÑ¡Ïî¿ÉÒÔ³¹µ×¹Ø±ÕMySQLµÄTCP/IPÁ¬½Ó·½Ê½£¬Èç¹ûWEB·þÎñÆ÷ÊÇÒÔÔ¶³ÌÁ¬½ÓµÄ·½Ê½·ÃÎÊMySQLÊý¾Ý¿â·þÎñÆ÷Ôò²»Òª¿ªÆô¸ÃÑ¡Ï·ñÔò½«ÎÞ·¨Õý³£Á¬½Ó£¡
table_cache=1024   
#ÎïÀíÄÚ´æÔ½´ó,ÉèÖþÍÔ½´ó.ĬÈÏΪ2402,µ÷µ½512-1024×î¼Ñ
innodb_additional_mem_pool_size=4M
#ĬÈÏΪ2M
innodb_flush_log_at_trx_commit=1
#ÉèÖÃΪ0¾ÍÊǵȵ½innodb_log_buffer_sizeÁжÓÂúºóÔÙͳһ´¢´æ,ĬÈÏΪ1
innodb_log_buffer_size=2M             
#ĬÈÏΪ1M
innodb_thread_concurrency=8         
#ÄãµÄ·þÎñÆ÷CPUÓм¸¸ö¾ÍÉèÖÃΪ¼¸,½¨ÒéÓÃĬÈÏÒ»°ãΪ8
key_buffer_size=256M                      
#ĬÈÏΪ218£¬µ÷µ½128×î¼Ñ
tmp_table_size=64M                        
#ĬÈÏΪ16M£¬µ÷µ½64-256×î¹Ò
read_buffer_size=4M                      
#ĬÈÏΪ64K
read_rnd_buffer_size=16M             
#ĬÈÏΪ256K
sort_buffer_size=32M                    
#ĬÈÏΪ256K
thread_cache_size=120              
#ĬÈÏΪ60
query_cache_size=32M 
 
¡ùÖµµÃ×¢ÒâµÄÊÇ£º
ºÜ¶àÇé¿öÐèÒª¾ßÌåÇé¿ö¾ßÌå·ÖÎö
Ò»¡¢Èç¹ûKey_readsÌ«´ó£¬ÔòÓ¦¸Ã°Ñmy.cnfÖÐKey_buffer_size±ä´ó£¬±£³ÖKey_reads/Key_read_requestsÖÁÉÙ1/100ÒÔÉÏ£¬Ô½Ð¡Ô½ºÃ¡£
¶þ¡¢Èç¹ûQcache_lowmem_prunesºÜ´ó£¬¾ÍÒªÔö¼ÓQuery_cache_sizeµÄÖµ¡£

Õª×ÔС±¦À϶¹µÄרÀ¸
·¢±íÆÀÂÛ
Çë×Ô¾õ×ñÊØ»¥ÁªÍøÏà¹ØµÄÕþ²ß·¨¹æ£¬ÑϽû·¢²¼É«Çé¡¢±©Á¦¡¢·´¶¯µÄÑÔÂÛ¡£
Óû§Ãû: ÑéÖ¤Âë:µã»÷ÎÒ¸ü»»Í¼Æ¬
×îÐÂÆÀÂÛ ¸ü¶à>>

ÍƼöÈȵã

  • mysql-mmm
  • mysqldumpÃüÁ¡ªMySQLÊý¾Ý¿â±¸·Ý»¹Ô­
  • OracleÊý¾Ýµ¼ÈëMySQLµÄ¿ì½Ý¹¤¾ß£ºMySQL Migration Toolkit
  • ¼ò¼òµ¥µ¥´¢´æ¹ý³Ì¡ª¡ªÑ­»·Ò»¸öselect½á¹û¼¯
  • MySQLÊý¾Ý¿âÊ®´óÓÅ»¯¼¼ÇÉ
  • Mysql°²×°±Ê¼Ç
  • MysqlÖ÷Ö÷¸´ÖƼܹ¹ÅäÖÃ
  • MysqlµÄProcedure ²ÎÊýΪNULLÎÊÌâ·ÖÎö
  • MySQL StmtÔ¤´¦ÀíÌá¸ßЧÂÊÎÊÌâµÄСÑо¿
ÍøÕ¾Ê×Ò³ - ÓÑÇéÁ´½Ó - ÍøÕ¾µØͼ - TAG±êÇ© - RSS¶©ÔÄ - ÄÚÈÝËÑË÷
Copyright © 2008-2015 ¼ÆËã»ú¼¼Êõѧϰ½»Á÷Íø. °æȨËùÓÐ

Ô¥ICP±¸11007008ºÅ-1