MySQL Forums
Forum List  »  Russian

[mysql] Отстаёт репликация
Posted by: skeletor sergei
Date: December 27, 2011 07:56AM

База большая (80 ГБ) и не одна и пока делал дамп и переносил на другой сервер и запустил - увидел отставание репликации на 6 дней. Думал, за пару дней наверстает, но увы. Ниже привожу конфиги master'a и slav'a. slave по большей степени простаивает. Тип таблиц - innodb на обоих серверах.
Подскажите, может какие-то переменные стоит изменить (хотя бы на время) что бы догнать репликацию?

master CPU(Xeon X3220 2.40GHz(4core)), RAM(8Gb), Mysql-5.5.17-2

[client]
port            = 3306
socket          = /var/run/mysqld/mysqld.sock
[mysqld_safe]
socket          = /var/run/mysqld/mysqld.sock
nice            = 0
[mysqld]
user            = mysql
pid-file        = /var/run/mysqld/mysqld.pid
socket          = /var/run/mysqld/mysqld.sock
port            = 3306
basedir         = /usr
datadir         = /home/mysql
tmpdir          = /home/mysql_tmp
skip-external-locking
skip-name-resolve
default-storage-engine = innodb
max_allowed_packet=50M
max_connections=1024
table_cache=4096
sort_buffer_size=8M
join_buffer_size=8M
thread_cache_size=384
thread_concurrency=12
query_cache_size = 64M
query_cache_limit = 2M
query_cache_type = 1
memlock
tmp_table_size = 1G
max_heap_table_size = 512M
key_buffer_size = 512M
wait_timeout = 28800
innodb_file_per_table
innodb_additional_mem_pool_size = 16M
innodb_buffer_pool_size = 5G
innodb_thread_concurrency = 8
innodb_flush_log_at_trx_commit = 2
innodb_log_group_home_dir = /home/mysql
innodb_log_buffer_size = 8M
innodb_log_file_size = 256M
innodb_log_files_in_group = 2
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120
innodb_flush_method=O_DIRECT
max_allowed_packet      = 64M
read_buffer_size        = 8M
thread_stack            = 128K
myisam-recover          = BACKUP
server-id               = 39
log_bin                 = /home/mysql/mysql-bin.log
expire_logs_days        = 10
max_binlog_size         = 100M
replicate-ignore-db     = mysql
replicate-ignore-db     = roundcubebase
replicate-ignore-db     = postfix
relay-log               = /home/mysql/mysql-relay-log
relay-log-index         = mysql-relay-log-index
log-slave-updates       = 1
[mysqldump]
quick
quote-names
max_allowed_packet      = 16M
[mysql]
[isamchk]
key_buffer              = 32M
myisam_sort_buffer_size = 16M
[mysqld_safe]
open-files-limit=32000

slave CPU(Xeon E5405 2GHz (4core)), RAM(4Gb)

[client]
port            = 3306
socket          = /tmp/mysql.sock
[mysqld_safe]
socket          = /tmp/mysql.sock
[mysqld]
user            = mysql
socket          = /tmp/mysql.sock
port            = 3306
skip-external-locking
skip-name-resolve
default-storage-engine = innodb
max_allowed_packet=50M
max_connections=1024
table_cache=4096
sort_buffer_size=8M
join_buffer_size=8M
thread_cache_size=384
thread_concurrency=12
query_cache_size = 64M
query_cache_limit = 2M
query_cache_type = 1
memlock
tmp_table_size = 256M
max_heap_table_size = 256M
key_buffer_size = 256M
wait_timeout = 28800
innodb_file_per_table
innodb_additional_mem_pool_size = 16M
innodb_buffer_pool_size = 512M
innodb_thread_concurrency = 8
innodb_flush_log_at_trx_commit = 2
innodb_log_group_home_dir = /mysql_bckp/mysql
innodb_log_buffer_size = 8M
innodb_log_file_size = 256M
innodb_log_files_in_group = 2
innodb_max_dirty_pages_pct = 90
innodb_lock_wait_timeout = 120
innodb_flush_method=O_DIRECT
max_allowed_packet      = 64M
read_buffer_size        = 8M
thread_stack            = 128K
myisam-recover          = BACKUP
server-id               = 40
expire_logs_days        = 10
max_binlog_size         = 100M
replicate-ignore-db     = mysql
relay-log               = mysql-relay-log
relay-log-index         = mysql-relay-log-index
expire_logs_days        = 10
slave-skip-errors      = 1062 1060 1050 1690
[mysqldump]
quick
quote-names
max_allowed_packet      = 16M
[mysql]
[isamchk]
key_buffer              = 32M
myisam_sort_buffer_size = 16M
[mysqld_safe]
open-files-limit=32000

Options: ReplyQuote


Subject
Views
Written By
Posted
[mysql] Отстаёт репликация
4186
December 27, 2011 07:56AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.