Fork me on GitHub

Percona Server 高可用与调优指南

 

# 查询事物隔离级别
SHOW VARIABLES LIKE 'transaction%';
SELECT @@GLOBAL.transaction_isolation,@@transaction_isolation;

# 修改全局隔离级别为读提交
SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED
# 修改会话隔离级别
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;

# 可选参数有:READ-UNCOMMITTED, READ-COMMITTED, REPEATABLE-READ, SERIALIZABLE.
[mysqld]
transaction-isolation=READ-COMMITTED

 

# Percona Server template configuration
# Percona 8.0.15 参数调优(https://support.huaweicloud.com/tngg-kunpengdbs/kunpengpercona_05_0015.html)
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html

[mysqld]
# 启用线程池 (https://www.percona.com/doc/percona-server/8.0/performance/threadpool.html)
thread_handling=pool-of-threads
ssl=0 #关闭ssl
max_connections=1000  #设置最大连接数
back_log=2048  #设置会话请求缓存个数
performance_schema=OFF #关闭性能模式,非生产环境,测试极限性能设置为OFF。
max_prepared_stmt_count=128000
lock_wait_timeout=60

#buffers
innodb_buffer_pool_size=1G #设置buffer pool size,一般为服务器内存60%
innodb_buffer_pool_instances=16 #设置buffer pool instance个数,提高并发能力
innodb_log_buffer_size=200M #设置log buffer size大小
innodb_lock_wait_timeout=120

#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove the leading "# " to disable binary logging
# Binary logging captures changes between backups and is enabled by
# default. It's default setting is log_bin=binlog
# disable_log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
#
# Remove leading # to revert to previous value for default_authentication_plugin,
# this will increase compatibility with older clients. For background, see:
# https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_default_authentication_plugin
# default-authentication-plugin=mysql_native_password

REFER :

https://www.percona.com/downloads/

https://github.com/sysown/proxysql

MySQL 最优配置文件模板

https://github.com/jdaaaaaavid/mysql_best_configuration

Percona 8.0.15 调优指南(鲲鹏920 for CentOS 7.6)

https://support.huaweicloud.com/tngg-kunpengdbs/kunpengpercona_05_0015.html

Percona XtraDB Cluster 8.0 与 Proxysql 史上最详尽用法指南

https://segmentfault.com/a/1190000037760128

互联网项目中mysql应该选什么事务隔离级别

https://www.cnblogs.com/rjzheng/p/10510174.html

仅此一文让你明白事务隔离级别、脏读、不可重复读、幻读

https://www.cnblogs.com/yubaolee/p/10398633.html

新说Mysql事务隔离级别

https://www.cnblogs.com/rjzheng/p/9955395.html

彻底搞懂 MySQL 事务的隔离级别

https://developer.aliyun.com/article/743691

事务隔离级别中的可重复读能防幻读吗?

https://www.cnblogs.com/CoderAyu/p/11525408.html

posted @ 2016-11-28 20:21  花儿笑弯了腰  阅读(301)  评论(0编辑  收藏  举报