签到成功

知道了

CNDBA社区CNDBA社区

Mysql OCP 51题

2021-12-13 21:08 48138 0 原创 mysql
作者: hbhe0316

You inherited a busy InnoDB OLTP Instance with 100 schemas and 100 active users per schema.
. Total dataset size is 200G with an average schema size of 2G.
. The data is transient and is not backed up and can be repopulated easily.
. Performance and responsiveness of the DB is paramount.
. The query pattern for the DB instance is split 90/ 10 read/ write.
. DB host is dedicated server with 256G RAM and 64 cores.http://www.cndba.cn/hbhe0316/article/22791http://www.cndba.cn/hbhe0316/article/22791http://www.cndba.cn/hbhe0316/article/22791http://www.cndba.cn/hbhe0316/article/22791http://www.cndba.cn/hbhe0316/article/22791http://www.cndba.cn/hbhe0316/article/22791

One of your colleagues made some recent changes to the system and users are now complaining of performance impacts.
Which four configuration file edits might your colleague have performed to cause the negative DB performance?
A. table_open_cache = 64
B. innodb_buffer_pool_instances=64; innodb_buffer_pool_size=200G
C. log_bin=mysql-bin; Innodb_flush_log_at_trx_commit=1
D. sync_binlog=10
E. innodb_flush_method=O_DIRECT
F. max_heap_table_size = 2G; tmp_table_size=2G
G. query_cache_size = 2G; query_cache_enabled=1
H. innodb_flush_log_at_trx_commit=0
Answer:ACFGhttp://www.cndba.cn/hbhe0316/article/22791

http://www.cndba.cn/hbhe0316/article/22791
http://www.cndba.cn/hbhe0316/article/22791

你接手了一个繁忙的InnoDB OLTP数据库,包含100个schema,每个schema有100个活动的用户。
数据库总大小200G,平均每个schema的大小为2GB
数据大多是临时数据,并且可以轻易的重新生成
数据库的性能是固定的
数据库上读写比例是9:1
数据库服务器是独立的server,包含256GB内存和64CORE CPU
你的同时最近做了一些变更,导致用户抱怨数据库性能有所下降。下面哪4项配置会导致数据库性能下降?
控制多久MySQL服务器同步二进制日志到磁盘。
sync_binlog=0:禁用二进制日志磁盘同步MySQL服务器。相反,MySQL服务器依赖于操作系统冲洗二进制日志磁盘时,它的任何其他文件。此设置提供了最好的性能,但在一个断电或操作系统崩溃的事件,很可能是服务器已提交的事务没有被同步到二进制日志。
sync_binlog=1:使二进制日志同步到磁盘之前交易的承诺。这是最安全的设置,但可以对性能的磁盘数量增加的负面影响写。在一个断电或操作系统崩溃的事件,是从二进制日志丢失的交易只有在准备好的状态。这允许自动恢复程序回滚事务,保证没有交易是从二进制日志丢失。
sync_binlog=N,在那里N除了0或1个值:二进制日志同步到磁盘后N二进制日志提交组已收集。在一个断电或操作系统崩溃的事件,很可能是服务器已提交的事务尚未刷新到二进制日志。这个设置会对性能产生由于磁盘数量增加的负面影响写。较高的值可以提高性能,但随着数据丢失的风险增加。
为最大可能的耐久性和一致性的复制设置,使用InnoDB在交易中,使用这些设置:
sync_binlog=1
innodb_flush_log_at_trx_commit=1http://www.cndba.cn/hbhe0316/article/22791

版权声明:本文为博主原创文章,未经博主允许不得转载。

MYSQL

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
hbhe0316

hbhe0316

关注

1.只有承认无知,才能装下新的东西; 2.进步来自一点点滴滴的积累; 3.广博让你更优秀,而专业让你无法替代; 4.挫折和失败能够转换为一种财富。

  • 889
    原创
  • 1
    翻译
  • 13
    转载
  • 24
    评论
  • 访问:2656113次
  • 积分:1523
  • 等级:核心会员
  • 排名:第6名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ