Multi thread slave_performance_on_opc

303 visualizaciones

Publicado el

How performance is different by configuring slave_parallel_workers.
slave_parallel_workersの設定によるレプリケーション遅延の解消

Publicado en: Software
0 comentarios
0 recomendaciones
Estadísticas
Notas
  • Sé el primero en comentar

  • Sé el primero en recomendar esto

Sin descargas
Visualizaciones
Visualizaciones totales
303
En SlideShare
0
De insertados
0
Número de insertados
248
Acciones
Compartido
0
Descargas
0
Comentarios
0
Recomendaciones
0
Insertados 0
No insertados

No hay notas en la diapositiva.

Multi thread slave_performance_on_opc

  1. 1. Copyright © 2016 Oracle and/or its affiliates. All rights reserved. | MySQL Multi Thread Slave Performance Evaluation on OPC (OC3) MySQL Global Business Unit Shinya Sugiyama
  2. 2. Copyright © 2016 Oracle and/or its affiliates. All rights reserved. Environment 2 Oracle Cloud MySQL Service Master and Slave Instance: OC3 (1OCPU(2 vCPU), 7.5 GB Mem) MySQL Version: MySQL5.7.16 Monitoring: MySQL Enterprise Monitor (Separate Instance)
  3. 3. Copyright © 2016 Oracle and/or its affiliates. All rights reserved. Benchmark Changed parameter: slave_parallel_workers Thread 1, 2, 4, 8, 16,32 Other Parameter is OPC MySQL Service Default (Only Server ID was Changed) 3 +------------------------+-------+ | Variable_name | Value | +------------------------+-------+ | slave_parallel_workers | 8 | +------------------------+-------+ /u01/bin/mysql/bin/mysqlslap --no-defaults --create-schema=SLAP --engine=InnoDB --auto-generate-sql --auto-generate-sql-add-autoincrement --number-int-cols=3 --number-char-cols=5 --concurrency=10 -- auto-generate-sql-write-number=50000 --auto-generate-sql-execute-number=50000 --auto-generate-sql- load-type=mixed -h localhost -u oracle +-----------------------------+-------+ | Variable_name | Value | +-----------------------------+-------+ | slave_preserve_commit_order | ON | +-----------------------------+-------+ +---------------------+---------------+ | Variable_name | Value | +---------------------+---------------+ | slave_parallel_type | LOGICAL_CLOCK | +---------------------+---------------+
  4. 4. Copyright © 2016 Oracle and/or its affiliates. All rights reserved. Benchmark1 4 [oracle@study01-mysql-1 ~]$ ./mysqlslap.sh Benchmark Running for engine InnoDB Average number of seconds to run all queries: 185.845 seconds Minimum number of seconds to run all queries: 185.845 seconds Maximum number of seconds to run all queries: 185.845 seconds Number of clients running queries: 10 Average number of queries per client: 50000 Study02: slave_parallel_workers = 1 Study03: slave_parallel_workers = 16 CPU USAGE: Elapsed time is much longer in case of parallel_workers 1 . CPU usage of parallel_workers 16 is less than 1 even total thread number is larger than 1. QUERIES and DELAY parallel_workers 16 is much faster than parallel_workers 1, so Behind_master is resolved soon.
  5. 5. Copyright © 2016 Oracle and/or its affiliates. All rights reserved. Benchmark2 5 [oracle@study01-mysql-1 ~]$ ./mysqlslap.sh Benchmark Running for engine InnoDB Average number of seconds to run all queries: 190.973 seconds Minimum number of seconds to run all queries: 190.973 seconds Maximum number of seconds to run all queries: 190.973 seconds Number of clients running queries: 10 Average number of queries per client: 50000 Study02: slave_parallel_workers = 2 Study03: slave_parallel_workers = 16 CPU USAGE: Elapsed time is longer in case of parallel_workers 2 . CPU usage of parallel_workers 16 is less than 2 even total thread number is larger than 2. QUERIES and DELAY parallel_workers 16 is faster than parallel_workers 2, so Behind_master is resolved soon.
  6. 6. Copyright © 2016 Oracle and/or its affiliates. All rights reserved. Benchmark3 6 [oracle@study01-mysql-1 ~]$ ./mysqlslap.sh Benchmark Running for engine InnoDB Average number of seconds to run all queries: 186.468 seconds Minimum number of seconds to run all queries: 186.468 seconds Maximum number of seconds to run all queries: 186.468 seconds Number of clients running queries: 10 Average number of queries per client: 50000 Study02: slave_parallel_workers = 4 Study03: slave_parallel_workers = 16 CPU USAGE: Elapsed time is little longer in case of parallel_workers 4 . CPU usage of parallel_workers 16 is less than 4 even total thread number is larger than 4. QUERIES and DELAY parallel_workers 16 is still faster than parallel_workers 4, so Behind_master is resolved little faster than 4.
  7. 7. Copyright © 2016 Oracle and/or its affiliates. All rights reserved. Benchmark4 7 [oracle@study01-mysql-1 ~]$ ./mysqlslap.sh Benchmark Running for engine InnoDB Average number of seconds to run all queries: 188.104 seconds Minimum number of seconds to run all queries: 188.104 seconds Maximum number of seconds to run all queries: 188.104 seconds Number of clients running queries: 10 Average number of queries per client: 50000 Study02: slave_parallel_workers = 8 Study03: slave_parallel_workers = 16 CPU USAGE: Elapsed time is almost same beteen parallel_workers 8 and parallel_workers 16. QUERIES and DELAY There is not much difference between parallel_workers 8 and parallel_workers 16, so Behind_master is almost same.
  8. 8. Copyright © 2016 Oracle and/or its affiliates. All rights reserved. Trial (トライアル) 8 ■ Oracle MySQL Cloud Service English https://cloud.oracle.com/mysql 日本語サイト https://cloud.oracle.com/ja_JP/mysql ■ MySQL Enterprise Monitor Trial http://edelivery.oracle.com/ https://www-jp.mysql.com/trials/

×