Sanyh
Старатель
- Регистрация
- 20 Сен 2006
- Сообщения
- 284
- Реакции
- 13
- Автор темы
- #1
можно ли как то снизить нагрузку на mysql ?
а то большой показатель LA из за нее.
сервер 6 гб озу, centos 5 32bit, cpu 2 x Intel Dual Core Xeon 5130 2.0Ghz
8Gb Ram
centos 5 32bit
Nginx+Apache
31944 mysql 0
34.3% CPU
1.4 RAM /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/d2.ru.pid --skip-external-locking
my.cnf
[mysqld]
max_connections = 500
max_user_connections = 100
safe-show-database
key_buffer = 32M
myisam_sort_buffer_size = 32M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 1M
record_buffer = 1M
max_allowed_packet = 16M
table_cache = 500
thread_cache_size = 128
wait_timeout = 180
connect_timeout = 60
interactive_timeout = 180
max_connect_errors = 10
query_cache_type = 1
query_cache_limit = 2M
query_cache_size = 32M
skip-locking
skip-bdb
skip-character-set-client-handshake
#skip-innodb
safe-show-database
default-character-set=cp1251
#log-slow-queries = /var/log/mysqld.slow.log
#long_query_time = 2
[mysql]
no-auto-rehash
default-character-set=cp1251
[mysqld_safe]
open_files_limit = 8192
[mysqldump]
quick
max_allowed_packet = 16M
[myisamchk]
key_buffer = 64M
sort_buffer = 32M
read_buffer = 16M
write_buffer = 16M
а то большой показатель LA из за нее.
сервер 6 гб озу, centos 5 32bit, cpu 2 x Intel Dual Core Xeon 5130 2.0Ghz
8Gb Ram
centos 5 32bit
Nginx+Apache
31944 mysql 0
34.3% CPU
1.4 RAM /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql --pid-file=/var/lib/mysql/d2.ru.pid --skip-external-locking
my.cnf
[mysqld]
max_connections = 500
max_user_connections = 100
safe-show-database
key_buffer = 32M
myisam_sort_buffer_size = 32M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 1M
record_buffer = 1M
max_allowed_packet = 16M
table_cache = 500
thread_cache_size = 128
wait_timeout = 180
connect_timeout = 60
interactive_timeout = 180
max_connect_errors = 10
query_cache_type = 1
query_cache_limit = 2M
query_cache_size = 32M
skip-locking
skip-bdb
skip-character-set-client-handshake
#skip-innodb
safe-show-database
default-character-set=cp1251
#log-slow-queries = /var/log/mysqld.slow.log
#long_query_time = 2
[mysql]
no-auto-rehash
default-character-set=cp1251
[mysqld_safe]
open_files_limit = 8192
[mysqldump]
quick
max_allowed_packet = 16M
[myisamchk]
key_buffer = 64M
sort_buffer = 32M
read_buffer = 16M
write_buffer = 16M