サバフェス表彰式lt+α
TRANSCRIPT
@gotyoooo 言い出しっぺ 好きなツールはChef
Mさん(twitterやってない) gotyoooがいつもMySQLで困ったら相談する方 データベースエンジニア 涼しい顔で火を吹いてるDBを助けている姿をよく見る
@dekokun gotyooooの尊敬する先輩 本職はサーバサイドプログラム(主にPHP) CI厨
serviceで管理してなかった
1.前回ご案内したnfsマウントポイントにあるデータに対して、自身の構築したDBに一致するデータをダウンロードします。 2.ベンチマーク用DBデータに書き戻す前にDBの停止を行います。 3.DBのデータを書き戻します。 4.DBのデータ権限をmysqlに設定します。 5.DBの起動を行います。 6.ビルドしたtpcc-mysqlに前回ご案内したパラメータにてベンチマークをします。
serviceで管理してなかった
1.前回ご案内したnfsマウントポイントにあるデータに対して、自身の構築したDBに一致するデータをダウンロードします。 2.ベンチマーク用DBデータに書き戻す前にDBの停止を行います。 3.DBのデータを書き戻します。 4.DBのデータ権限をmysqlに設定します。 5.DBの起動を行います。 6.ビルドしたtpcc-mysqlに前回ご案内したパラメータにてベンチマークをします。
3/8 2:15
こんなlogががが・・・
InnoDB: Error: page ?????? log sequence number ?????? InnoDB: is in the future! Current system log sequence number ??????.
起動時にib_logファイルがないことに気づく 正しいib_logファイルがないと治らんやん!
start時/nfs_mountからib_logファイルをcp
起動後すぐに停止し、ib_logfileのサイズを変えたバージョンのmy.cnfを読み込むよう
不要デーモンを止める• 以下デーモンをstopし,chkconfigをoffに • iptables • ip6tables • postfix • acpid • auditd • cpuspeed • haldaemon • kdump • messagebus • quota_nld • rdisc
limits.conf• mysql soft nproc 32768 • mysql hard nproc 32768 • mysql soft nofile 65536 • mysql hard nofile 65536
sysctl.conf(1)• For MySQL parameter • kernel.sem = 250 32000 100 500 • vm.overcommit_memory=1 • vm.overcommit_ratio=99 • vm.swappiness=0 • kernel.msgmni=1024
sysctl.conf(2)• For Network • net.core.somaxconn = 1024 • net.core.rmem_max = 8388608 • net.core.wmem_max = 6553600 • net.ipv4.tcp_rmem = 4096 87380 8388608 • net.ipv4.tcp_wmem = 4096 65536 6553600 • net.ipv4.tcp_fin_timeout = 5 • net.ipv4.ip_local_port_range = 1024 65535 • net.ipv6.conf.all.disable_ipv6 = 1 • net.ipv6.conf.default.disable_ipv6 = 1
• 非同期I/Oリクエスト数上限 • fs.aio-max-nr = 1048576
/etc/profile• 以下追記 if [ $USER = "mysql" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 32768 ulimit -n 65536 else ulimit -u 32768 -n 65536 fi fi
fusion-io設定(1)• ブロックサイズ変更 # umount /dev/fioa # fio-detach /dev/fct0 # fio-format --block-size 4096 /dev/fct0 # fio-attach /dev/fct0
fusion-io設定(2)• ext4ファイルシステム構築・マウント • inode領域を広げる • journalを無効化 • xfsより良かった # mkfs.ext4 -b 4096 -f 4096 -I 256 /dev/fioa # tune2fs -o journal_data_writeback /dev/fioa # tune2fs -O ^has_journal /dev/fioa # e2fsck -f /dev/fioa # debugfs -R features /dev/fioa # mount -o defaults,noatime,nodiratime,nobarrier,data=writeback -t ext4 /dev/fioa /fioa
my.cnf設定※Percona5.6• レギュレーション • innodb_doublewrite • innodb_flush_log_at_trx_commit = 1
• Thread Pool • thread_handling = pool-of-threads • thread_pool_size = 32 • thread_pool_oversubscribe = 32
今回他はあまり詰め切れなかったため公開はここまで
Copyright 2014 CYBIRD Co., Ltd. All Rights Reserved.
http://www.cybird.co.jp/recruit/
エントリーしてね!
エンジニア募集中!