サバフェス! 2015 spring lt資料
TRANSCRIPT
-
2015 Spring 2015-03-26 Lightning Talk @ttkzw : zzz
-
: @ttkzw :
: zzz
: @ttkzw hubPOST
2
2015/03/26 2015 Spring
-
IDC 2015 Spring https://2015spring.serverfesta.info/
2015/03/26 2015 Spring
3
-
2015/03/26 2015 Spring
4
-
README
2015/03/26 2015 Spring
5
-
2015/03/26 2015 Spring
6
36()0:00 TV
-
2015/03/26 2015 Spring
7
2:30
-
41
2015/03/26 2015 Spring
8
380
-
21
2015/03/26 2015 Spring
9
1
-
2015/03/26 2015 Spring
10
-
2015/03/26 2015 Spring
11
-
Percona 5.6 Percona
PerconaioDrive
MySQL 5.6 3Percona 5.6
2015/03/26 2015 Spring
12
-
2015/03/26 2015 Spring
13
-
InnoDB
Direct I/O
ioDrive InnoDB
2015/03/26 2015 Spring
14
-
I/OI/O
2015/03/26 2015 Spring
15
-
OS: SELinuxdisabled
/etc/sysconfig/selinux SELINUX=disabled
chkconfig postfix off chkconfig crond off chkconfig atd off chkconfig auditd off chkconfig abrtd off chkconfig iptables off chkconfig ip6tables off chkconfig rsyslog off
2015/03/26 2015 Spring
16
-
OS: /etc/sysctl.conf
vm.swappiness = 0 vm.dirty_background_ratio = 5 vm.dirty_ratio = 10 net.core.wmem_default = 1048576 net.core.rmem_default = 1048576 net.core.wmem_max = 4194304 net.core.rmem_max = 4194304 net.ipv4.tcp_mem = 6291456 6291456 6291456 net.ipv4.tcp_wmem = 4096 1048576 4194304 net.ipv4.tcp_rmem = 4096 1048576 4194304
2015/03/26 2015 Spring
17
-
OS:
EXT4XFS
noatime,nodiratime atime discard TRIM nobarrier
2015/03/26 2015 Spring
18
-
ioDrive /etc/modprobe.d/iomemory-vsl.conf
options iomemory-vsl use_workqueue=0 I/O
/etc/sysconfig/iomemory-vsl ENABLED=1 FIO_DRIVER_MOD_OPTS="use_workqueue=0" MOUNTS="/fioa" /etc/fstab
/dev/fioa /fioa ext4 defaults,discard,noatime,nodiratime,noauto 0 0 noauto
2015/03/26 2015 Spring
19
-
2015/03/26 2015 Spring
20
-
my.cnf datadir=/fioa/mysql socket=/fioa/mysql/mysql.sock tmpdir=/fioa/tmp
ioDrive user=mysql skip-name-resolve
2015/03/26 2015 Spring
21
-
max_connections=40
tpcc_mysql-c3030+ max_allowed_packet=4M
net_buffer_length=256K
2015/03/26 2015 Spring
22
mysql> show global status like 'Byte%'; +----------------+-------------+ | Variable_name | Value | +----------------+-------------+ | Bytes_received | 2420522140 | | Bytes_sent | 12714377760 | +----------------+-------------+ 2 rows in set (0.00 sec)
-
NUMA flush_caches=ON (mysqld_safe) numa_interleave=ON (mysqld_safe) innodb_buffer_pool_populate=ON
2015/03/26 2015 Spring
23
https://www.percona.com/doc/percona-server/5.6/performance/innodb_numa_support.html
-
thread_handling=pool-of-threads thread_pool_size=64
2015/03/26 2015 Spring
24
http://www.percona.com/doc/percona-server/5.6/performance/threadpool.html
-
performance_schema=OFF
table_open_cache=1600 table_open_cache_instances=16
query_cache_type=0 query_cache_size=0
2015/03/26 2015 Spring
25
400
| Open_files | 16 | | Open_streams | 0 | | Open_table_definitions | 76 | | Open_tables | 360 | | Opened_files | 149 | | Opened_table_definitions | 76 | | Opened_tables | 367 | | Table_open_cache_hits | 56660865 | | Table_open_cache_misses | 367 | | Table_open_cache_overflows | 0 |
-
2015/03/26 2015 Spring
26
-
innodb_doublewrite innodb_flush_log_at_trx_commit=1
2015/03/26 2015 Spring
27
-
innodb_file_per_table
2015/03/26 2015 Spring
28
-
Direct I/O innodb_flush_method=ALL_O_DIRECT
Percona, MariaDB innodb_log_block_size=4096
innodb_disable_sort_file_cache=ON
2015/03/26 2015 Spring
29
http://www.percona.com/doc/percona-server/5.6/scalability/innodb_io.html
-
innodb_buffer_pool_size=28G
SWAP
innodb_buffer_pool_instances=8
2015/03/26 2015 Spring
30
-
I/O innodb_write_io_threads=20 innodb_read_io_threads=20
2015/03/26 2015 Spring
31
-
innodb_flush_neighbors=0 innodb_adaptive_flushing=1 innodb_io_capacity=8000 innodb_io_capacity_max=9500 innodb_lru_scan_depth=2000
2015/03/26 2015 Spring
32
-
1 39000tpm 10002000tpm
2015/03/26 2015 Spring
33
-
2015/03/26 2015 Spring
34
-
innodb_log_file_size=512M innodb_log_files_in_group=14
5000tpm
2015/03/26 2015 Spring
35
-
2015/03/26 2015 Spring
36
-rw-rw---- 1 mysql mysql 536870912 3 22 01:05 2015 ib_logfile0 -rw-rw---- 1 mysql mysql 536870912 3 22 00:52 2015 ib_logfile1 -rw-rw---- 1 mysql mysql 536870912 3 22 00:48 2015 ib_logfile10 -rw-rw---- 1 mysql mysql 536870912 3 22 00:48 2015 ib_logfile11 -rw-rw---- 1 mysql mysql 536870912 3 22 00:48 2015 ib_logfile12 -rw-rw---- 1 mysql mysql 536870912 3 22 00:48 2015 ib_logfile13 -rw-rw---- 1 mysql mysql 536870912 3 22 00:53 2015 ib_logfile2 -rw-rw---- 1 mysql mysql 536870912 3 22 00:55 2015 ib_logfile3 -rw-rw---- 1 mysql mysql 536870912 3 22 00:56 2015 ib_logfile4 -rw-rw---- 1 mysql mysql 536870912 3 22 00:58 2015 ib_logfile5 -rw-rw---- 1 mysql mysql 536870912 3 22 00:59 2015 ib_logfile6 -rw-rw---- 1 mysql mysql 536870912 3 22 01:01 2015 ib_logfile7 -rw-rw---- 1 mysql mysql 536870912 3 22 01:03 2015 ib_logfile8 -rw-rw---- 1 mysql mysql 536870912 3 22 01:03 2015 ib_logfile9
-
innodb_flushing_avg_loops=1000
(5)500tpm innodb_max_dirty_pages_pct=90
1500tpm
2015/03/26 2015 Spring
37
-
2015/03/26 2015 Spring
38
-
XFS EXT4nobarrier /etc/init.d/mysql sync; echo 3 > /proc/sys/vm/drop_caches
2015/03/26 2015 Spring
39
-
2015/03/26 2015 Spring
40