searchusermenu
  • 发布文章
  • 消息中心
点赞
收藏
评论
分享
原创

mysql参数调整

2023-10-19 03:33:12
14
0

调优
1)优化语句(可能一台服务器上存在多个实例,多个实例都得做参数优化)

cat updatepm.sh 

echo `ps -ef|grep 8802|grep mysqld|grep sock|awk '{print $(NF-1)}'|awk -F '=' '{print $2}'`

 mysql -S /app/teledb/39/socket_8802/mysql_8802.sock -uroot -e "set global innodb_thread_concurrency=128;"

sudo mysql -S /app/teledb/teledb/teledb_951450244879483904/socket_8801/mysql_8801.sock -h IP -P 8801 -uroot -p -e"set global innodb_buffer_pool_size=96636764160;set global innodb_thread_concurrency=48;set global thread_pool_size=64;set global thread_pool_stall_limit=100;set global thread_pool_oversubscribe=5;"
上面的缓冲池大小为90G,可根据主机内存实际情况调整 (free -m 查看内存),上面语句中的部署路径、端口、ip需根据部署实际情况调整

 

(1)/app/teledb/teledb/teledb_955187092961362944/mysql_8801/etc/mysql8801.cnf 

set global innodb_buffer_pool_size=96636764160;
set global innodb_thread_concurrency=48;
set global thread_pool_size=64;
set global thread_pool_stall_limit=100;
set global thread_pool_oversubscribe=5;

2)优化后查看参数情况:
mysql -S /app/teledb/teledb/teledb_951450244879483904/socket_8801/mysql_8801.sock -uroot -p

mysql -hIP -P 8801 -uroot -p -e
"show variables like '%buffer_pool_size%';
show variables like '%innodb_thread_concurrency%';
show variables like '%thread_pool_size%';
show variables like '%thread_pool_stall_limit%';
show variables like 'thread_pool_oversubscribe%';"

0条评论
作者已关闭评论
马****君
2文章数
0粉丝数
马****君
2 文章 | 0 粉丝
马****君
2文章数
0粉丝数
马****君
2 文章 | 0 粉丝
原创

mysql参数调整

2023-10-19 03:33:12
14
0

调优
1)优化语句(可能一台服务器上存在多个实例,多个实例都得做参数优化)

cat updatepm.sh 

echo `ps -ef|grep 8802|grep mysqld|grep sock|awk '{print $(NF-1)}'|awk -F '=' '{print $2}'`

 mysql -S /app/teledb/39/socket_8802/mysql_8802.sock -uroot -e "set global innodb_thread_concurrency=128;"

sudo mysql -S /app/teledb/teledb/teledb_951450244879483904/socket_8801/mysql_8801.sock -h IP -P 8801 -uroot -p -e"set global innodb_buffer_pool_size=96636764160;set global innodb_thread_concurrency=48;set global thread_pool_size=64;set global thread_pool_stall_limit=100;set global thread_pool_oversubscribe=5;"
上面的缓冲池大小为90G,可根据主机内存实际情况调整 (free -m 查看内存),上面语句中的部署路径、端口、ip需根据部署实际情况调整

 

(1)/app/teledb/teledb/teledb_955187092961362944/mysql_8801/etc/mysql8801.cnf 

set global innodb_buffer_pool_size=96636764160;
set global innodb_thread_concurrency=48;
set global thread_pool_size=64;
set global thread_pool_stall_limit=100;
set global thread_pool_oversubscribe=5;

2)优化后查看参数情况:
mysql -S /app/teledb/teledb/teledb_951450244879483904/socket_8801/mysql_8801.sock -uroot -p

mysql -hIP -P 8801 -uroot -p -e
"show variables like '%buffer_pool_size%';
show variables like '%innodb_thread_concurrency%';
show variables like '%thread_pool_size%';
show variables like '%thread_pool_stall_limit%';
show variables like 'thread_pool_oversubscribe%';"

文章来自个人专栏
文章 | 订阅
0条评论
作者已关闭评论
作者已关闭评论
0
0