开启MySQL performance_schema后对性能的影响
来源:互联网 发布:mac电脑游戏推荐 编辑:程序博客网 时间:2024/05/22 10:49
原文地址
先占坑,还需要进一步测试
接上篇
使用 sysbench 对数据库进行压测,观察开启performance_schema后,对数据库性能的影响
压测计划
数据库版本为:percona mysql 5.6.35
prepar数据量:1000W
压测时长:3600S
并发:200/500/800
压测步骤
不开启performance_schema
mysql> show variables like '%performance_schema%' -> ;+--------------------------------------------------------+-------+| Variable_name | Value |+--------------------------------------------------------+-------+| performance_schema | OFF || performance_schema_accounts_size | -1 || performance_schema_digests_size | -1 || performance_schema_events_stages_history_long_size | -1 || performance_schema_events_stages_history_size | -1 || performance_schema_events_statements_history_long_size | -1 || performance_schema_events_statements_history_size | -1 || performance_schema_events_waits_history_long_size | -1 |……+--------------------------------------------------------+-------+32 rows in set (0.01 sec)
使用sysbench 对数据库进行压测
sysbench --test=./tests/db/oltp.lua --mysql-table-engine=innodb --mysql-host=192.168.3.26 --mysql-port=3312 --mysql-db=sbtest --oltp-table-size=10000000 --oltp_tables_count=3 --mysql-user=root --mysql-password=123456 preparesysbench --mysql-host=192.168.3.26 --mysql-port=3312 --mysql-user=root --mysql-password=123456 --test=./tests/db/oltp.lua --num-threads=200 --oltp-read-only=off --report-interval=10 --rand-type=uniform --max-time=3600 --max-requests=0 --percentile=99 runsysbench --test=./tests/db/oltp.lua --mysql-table-engine=innodb --mysql-host=192.168.3.26 --mysql-port=3312 --mysql-db=sbtest --oltp-table-size=10000000 --oltp_tables_count=3 --mysql-user=root --mysql-password=123456 cleanup
开启performance_schema
SELECT * FROM setup_instruments WHERE NAME LIKE 'statement/%';update setup_instruments set ENABLED='NO',TIMED ='NO' ;update setup_instruments set ENABLED='YES',TIMED ='YES' WHERE NAME LIKE 'statement/%';update setup_consumers set ENABLED ='NO'; update setup_consumers set ENABLED ='YES' WHERE NAME LIKE 'events_statements_current';update setup_consumers set ENABLED ='YES' WHERE NAME LIKE 'statements_digest';update setup_consumers set ENABLED = 'YES' where name like '%instrumentation';SELECT * FROM setup_timers WHERE NAME = 'statement';
使用sysbench 对数据库进行压测
sysbench --test=./tests/db/oltp.lua --mysql-table-engine=innodb --mysql-host=192.168.3.25 --mysql-port=3312 --mysql-db=sbtest --oltp-table-size=10000000 --oltp_tables_count=3 --mysql-user=root --mysql-password=123456 preparesysbench --mysql-host=192.168.3.25 --mysql-port=3312 --mysql-user=root --mysql-password=123456 --test=./tests/db/oltp.lua --num-threads=200 --oltp-read-only=off --report-interval=10 --rand-type=uniform --max-time=3600 --max-requests=0 --percentile=99 runsysbench --test=./tests/db/oltp.lua --mysql-table-engine=innodb --mysql-host=192.168.3.25 --mysql-port=3312 --mysql-db=sbtest --oltp-table-size=10000000 --oltp_tables_count=3 --mysql-user=root --mysql-password=123456 cleanup
测试结果收集
结论
(1)开启MySQL5.6的performance_schema 性能监控功能,对数据库性能影响有限
(2)performance_schema提供了
原文地址
阅读全文
0 0
- 开启MySQL performance_schema后对性能的影响
- GraphicsMagick性能测试(二) - 开启多线程对性能的影响
- IO性能对MySql的影响
- table_open_cache参数对mysql性能的影响
- table_open_cache参数对mysql性能的影响
- 大表大事物对mysql性能的影响
- 服务器硬件对mysql性能的影响
- 数据库参数对mysql性能的影响
- MySql 对性能产生影响的条件
- iOS 开启热点后对状态栏的影响
- mysql autocommit对myisam,innodb的性能影响
- MySQL索引与存储方式对性能的影响
- mysql索引、存储方式对性能的影响
- mysql字段varchar长度分配对性能的影响
- 浅析MySQL事务隔离级别对其性能的影响
- mysql索引、存储方式对性能的影响
- 常用存储引擎对mysql性能的影响
- 开启log4j的记录源代码行号的配置,会对系统性能产生影响!
- 欢迎使用CSDN-markdown编辑器
- Eclipse中更换Maven默认中心仓库的方法
- 解决Sublime 3 Windows环境下 python 无法输入的问题
- 设计师如何制定设计原则
- Android开发,ZxMvp框架的引入及使用详解(下)
- 开启MySQL performance_schema后对性能的影响
- 搭建ELK(ElasticSearch+Logstash+Kibana)日志分析系统(六) ElasticSearch demo演示
- 【Gradle Build Tool 4.1用户指南】Chapter 3. Installing Gradle 第三章、安装Gradle
- 基于NCO3.0的SapRfcFunction测试工具开发之一
- 争取实现自己的小目标:向Siki老师要一张签名照 (17.09.14)
- SGISTL源码探究-stack配接器
- Web 开发模式演变历史和趋势
- 图像颜色增强算法Opencv
- Scout YYF I POJ