永久黄网站色视频免费直播,yy6080三理论日本中文,亚洲无码免费在线观看视频,欧美日韩精品一区二区在线播放

Board logo

標題: [求助] my.cnf該怎么優(yōu)化? [打印本頁]

作者: 我行我素    時間: 2012-1-6 11:03     標題: my.cnf該怎么優(yōu)化?

1G內(nèi)存 :   網(wǎng)站平均日訪問量在1萬左右,同時在線150-200左右,采用的偽靜態(tài)模式,基本上都是讀取數(shù)據(jù)庫的。該怎么優(yōu)化?
以下是默認的,該怎么優(yōu)化
  1. # mysql conf /etc/my.cnf
  2. # Created by http://www.fsowen.com
  3. # Last Updated 2010.06.01
  4. [client]
  5. port  = 3306
  6. socket  = /tmp/mysql.sock
  7. [mysqld]
  8. port  = 3306
  9. socket  = /tmp/mysql.sock
  10. skip-external-locking
  11. key_buffer_size = 128M
  12. max_allowed_packet = 1M
  13. table_open_cache = 256
  14. sort_buffer_size = 1M
  15. read_buffer_size = 1M
  16. read_rnd_buffer_size = 2M
  17. myisam_sort_buffer_size = 8M
  18. thread_cache_size = 8
  19. query_cache_size= 16M
  20. thread_concurrency = 8
  21. max_connections = 500
  22. wait_timeout = 30
  23. interactive_timeout = 30
  24. max_connect_errors = 9
  25. long_query_time = 1
  26. tmp_table_size = 16M
  27. #log-bin=mysql-bin
  28. #binlog_format=mixed
  29. #server-id = 1
  30. [mysqldump]
  31. quick
  32. max_allowed_packet = 8M
  33. [mysql]
  34. no-auto-rehash
  35. [myisamchk]
  36. key_buffer_size = 12M
  37. sort_buffer_size = 1M
  38. read_buffer = 1M
  39. write_buffer = 1M
  40. [mysqlhotcopy]
  41. interactive-timeout
  42.         
復(fù)制代碼





歡迎光臨 WDlinux官方論壇 (http://www.fsowen.com/bbs/) Powered by Discuz! 7.2