slave_exec_mode
http://dev.mysql.com/doc/refman/5.1/en/replication-options-slave.html#sysvar_slave_exec_mode[@more@]一直都习惯使用slave_skip_errors来忽略类似键值冲突和找不到键错误,偶然发现原来mysql里面竟然有这么一个参数,而且可以动态修改,当然由于未曾在生产环境使用过,还是要谨慎对待之。http://dev.mysql.com/doc/refman/5.1/en/replication-options-slave.html#sysvar_slave_exec_mode
try mysql5.5.8
install mysql558[@more@]首先阅读下官方文档说明http://dev.mysql.com/doc/refman/5.5/en/source-installation.html按照cmake吧,就不说了,下载源码,改bughttp://bugs.mysql.com/bug.php?id=58350http://lists.mysql.com/commits/126782编译CC='/usr/bin/gcc' CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC -Wall -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -DDBUG_OFF' CXX='/usr/bin/gcc' CXXFLAGS='-O2 -
mysql bug 55981
blob bug[@more@]http://www.mysqlperformanceblog.com/2010/11/29/data-corruption-drbd-and-story-of-bug/http://bugs.mysql.com/bug.php?id=55981root@test 06:52:04>CREATE TABLE t4(c1 int,c2 int,c3 MEDIUMBLOB,PRIMARY KEY(c1)) engine=innodb;Query OK, 0 rows affected (0.01 sec)root@test 06:52:05>insert into t4 values(1, 2, REPEAT('b', 54903));Query OK, 1 row affected (0.04 sec)root@test 06:52:12>start transaction;Query OK, 0 rows affected (0.00 sec)root@test 06:52:18>update t4 set c1 = 3;Quer
Surge Scalability 2010
Surge Scalability 2010[@more@]Surge Scalability 2010,值得关注下,转一位speaker的演讲概要在这里,希望有所启发。http://ronaldbradford.com/blog/speaking-at-surge-scalability-2010-2010-07-28/Overview:Some details of the presentation would include:The different types of accessible data (e.g. R/W, R, none) What limits MySQL availability (e.g software upgrades, blocking statements, locking etc)The three components of scalability – Read Scalability/Write Scalability/CachingDesign practices for increa
On MySQL replication, again…
http://mituzas.lt/2010/06/30/replication/[@more@]http://mituzas.lt/2010/06/30/replication/很是认同,转载下There are few things one is supposed to know about MySQL replication in production, as manual doesn’t always discuss things openly.This is small set of rules and advices I compiled (some apply to statement based replication only, but row based replication may benefit from one or two too):Don’t use MyISAM. Or in fact, don’t use any non-transactional engine, if you care about your data. On
innodb急着奔1.1?
作者: 弦乐之花 | 可以转载, 但必须以超链接形式标明文章原始出处和作者信息及版权声明链接http://shiri512003.itpub.net/post/37713/501173[@more@]5148的发布把innodb plugin带入了1.0.9时代,5147innodb plugin更新到了108版本还是马马虎虎能接受,5148的109版本真是乱来了,大家可以看下109的版本变化,innodb本身没有任何变化嘛。。。http://dev.mysql.com/doc/refman/5.1/en/news-5-1-48.htmlInnoDB Plugin has been upgraded to version 1.0.9. This version is considered of General Availability (GA) quality. InnoDB Plugin C
Percona release 5147
作者: 弦乐之花 | 可以转载, 但必须以超链接形式标明文章原始出处和作者信息及版权声明链接http://shiri512003.itpub.net/post/37713/501132 [@more@]最近没太关注percona分支的mysql5145以上版本了,(其实也是一直很期待基于5147的percona版出现的)今天偶然发现percona已经是发布了5.1.47-11.0,(oracle已经release了5148版,细细看了release note,没有升级的欲望也是)于是下来测试一把,发现还是有点意思的首先看下configue命令的帮助,比较有趣的percona把builtin版本的编译选项修改成只支持动态编译,plugin则支持动静态编译,刚
ibdata1
ibdata1[@more@]记得之前曾在Pub上看到innodb共享表空间暴涨的案例,自己在实际测试中也遇到多(高并发情况),其中缘由也是知晓一二,今天看到peter的两篇博文进行了详细的描述,简单记录下来备查。http://www.mysqlperformanceblog.com/2010/06/10/purge-thread-spira-of-death/I just wrote a large post on reasons for innodb main tablespace excessive growth and I thought it would make sense to explain briefly of why it is so frequently you have purge not being the problem at all and when out of no where you can se
一些文章收集
文章收集[@more@]fast paging in the real worldhttp://cafuego.net/2010/05/26/fast-paging-real-worldFixing MySQL group commit http://kristiannielsen.livejournal.com/12254.htmlOn Good Instrumentationhttp://www.mysqlperformanceblog.com/2010/05/31/on-good-instrumentation/
mysql表结构复制
作者: 弦乐之花 | 可以转载, 但必须以超链接形式标明文章原始出处和作者信息及版权声明链接http://shiri512003.itpub.net/post/37713/500220[@more@]我们特别是oracle dbas常常会通过ctas来复制表结构,这样复制出来的表实际上会丢掉表的一些属性,索引就更不说了,在mysql中这样来复制表其实得到的也只是表大体结构而已。还好mysql提供了create table like命令方便进行表结构的复制,废话不说了root@mysql 02:55:17>use testDatabase changedroot@test 03:25:22>create table t1(a int,b int,key (a)) engine=myisam;Query OK, 0 r
InnoDB Plugin has been upgraded to version 1.0.8
test[@more@]InnoDB Plugin has been upgraded to version 1.0.8http://dev.mysql.com/doc/refman/5.1/en/news-5-1-47.html目前能看到的plugin本身的改进并不多,不知道正式发布后的change log list能有多长。对于选择plugin版本的用户而言,希望percona&google&facebook这些分支所提供的一些优秀的patch,能够尽快经过innodb的测试认可,这样大家可以在收到性能收益的时候,也能更加安心的使用,个人而言是把innodb作为稳定性测试的最后一道卡。InnoDB stores redo log records in a hash table during recovery. On 64-bit syst
mysql innodb之select for update nowait
作者: 弦乐之花 | 可以转载, 但必须以超链接形式标明文章原始出处和作者信息及版权声明链接http://shiri512003.itpub.net/post/37713/499937[@more@]mysql innodb之select for update nowait习惯了oracle数据库的select for update nowait的同学,如果转在mysql环境开发的话,也许会不太适应——目前builtin版本的innodb不支持nowait句法的。早在08年已经被作为bug提了出来(http://bugs.mysql.com/bug.php?id=36285)。还好innodb plugin1.0.2开始支持bug文章里提及的session级innodb_lock_wait_timeout控制(http://dev.mysql.com/doc/i
mysql dead lock detection
作者: 弦乐之花 | 可以转载, 但必须以超链接形式标明文章原始出处和作者信息及版权声明链接http://shiri512003.itpub.net/post/37713/499911[@more@]在一组测试中发现并发从14到150(16core)性能有50%+的下降:#测试是通过sysbench进行的Activ Cmmit C_sel C_ins C_del C_upd15 24K 333K 24K 24K 71K14 25K 343K 25K 25K 74K13 24K 329K 24K 24K 71K15 24K 331K 24K 24K 71K16 24K 336K 24K 24K 72K16 24K 341K 24K 24K 73K16 23K 327K 23K 23K 70K12 23K 324K 23K 23K 69KActiv Cmmit C_sel C_ins C_del C_upd 149 8216 164K 8214 8214
Improve reporting with duplicate server-ids
作者: 弦乐之花 | 可以转载, 但必须以超链接形式标明文章原始出处和作者信息及版权声明http://shiri512003.itpub.net/post/37713/499272[@more@]测试xtrabackup搭建slave过程中,疏忽使用了其他slave的参数文件,导致一个master下面挂了两个server_id一样的slave,结果自然是出现些意外。还好master没有什么影响,除了不断的conn&disconn。。。,原本的slave自然也是错误不断加不停的conn&disconn。。。,数据库频繁的login/out在繁忙事情是很危险的操作,特别是对于大量的conn&disonn,对于数据库就是灾难~相关的一些信息:1.
innodb plugin 1.0.7 GA版本
作者: 弦乐之花 | 可以转载, 但必须以超链接形式标明文章原始出处和作者信息及版权声明http://shiri512003.itpub.net/post/37713/499158[@more@]innodb plugin自从09年11月发布1.0.6版本后,至今数月时间一直没有什么动静,现在为止1.0.6版仍然是作为RC版本包含在oracle@mysql分支中。生产环境我们已经尝试使用plugin版本。测试中发现plugin版本和percona出品的xtradb在性能上表现差不多的,while测试过程中并做针对性的参数调整,plugin和xtradb使用的是相同的参数文件。还有一个小小的发现是,同样性能下,plugin的主机cpu使用率要比xtr
mysql批量建表问题
作者: 弦乐之花 | 可以转载, 但必须以超链接形式标明文章原始出处和作者信息及版权声明链接http://shiri512003.itpub.net/post/37713/498969 [@more@]1.通过sysbench等工具模拟数据库压力2.通过脚本建立大量表3.观察步骤2实施前后系统性能变化基本结论1. 批量跑建表脚步对性能是有影响的,实际操作中,最好在每个建表语句后加上sleep(具体sleep时间视情况而定),以降低对生产库影响,更深层的原因,需要继续研究了。2. Mysiam引擎表建表速度上要快些,性能影响相对要比innodb小些,但从TOpen和Logon的变化程度估计,对系统的冲击也是很
Mysql编译安装参数优化
Mysql编译安装参数优化[@more@]1. -static --with-client-ldflags=-all-static --with-mysqld-ldflags=-all-static2. -pgcc CFLAGS="-O3 -mpentiumpro -mstack-align-double" CXX=gcc CXXFLAGS="-O3 -mpentiumpro -mstack-align-double -felide-constructors -fno-exceptions -fno-rtti"如果是Inter处理器,使用pgcc提高1%性能3. --enable-assembler
innodb plugin-Making Buffer Cache Scan Resistant
作者: 弦乐之花 | 可以转载, 但必须以超链接形式标明文章原始出处和作者信息及版权声明链接:http://shiri512003.itpub.net/post/37713/498378 [@more@]前些天还在感叹innodb load数据时无法绕开buffer cache(http://shiri512003.itpub.net/post/37713/497158),降低cache的使用效率,今天看innodb plugin 1.5的文档,发现对于这样的场景已经有了相应的参数进行控制,虽然并没有提供直接绕开buffer cache的方法,但相对而言已经好很多了。在该版本的发布声明上也特别提到了这方面的改进:(http://www.innodb.com/wp/2009/11/27/innodb-
now&sysdate函数差异
作者: 弦乐之花 | 可以转载, 但必须以超链接形式标明文章原始出处和作者信息及版权声明链接:http://shiri512003.itpub.net/post/37713/497442[@more@]mysql中now和sysdate行为是不一样的,引用文档中的说法NOW() returns a constant time that indicates the time at which the statement began to execute.SYSDATE() returns the time at which it executes. 两者的区别在于,对于一个语句,多个now函数的返回值是确定的,而对于sysdate,一个语句中的多个sysdate调用返回的结果是不能保证一致的,对于使用基于SBR的复制环境而言,可能造
binlog引起的奇怪现象
作者: 弦乐之花 | 可以转载, 但必须以超链接形式标明文章原始出处和作者信息及版权声明链接:http://shiri512003.itpub.net/post/37713/497388[@more@]今天早上数据库slow log异常多,查了下昨天也很多,于是到监控库里面查了下Mysql>select host,day,SlowQ from MYSQL_PERF_STATISTICS_NEW where host like 'test-%' and SlowQ>100 and day>'2010-02-01 00:00:00';+--------------+---------------------+-------+| host | day | SlowQ |+--------------+---------------------+-------+| test-1 | 2010-03-03 00:08:21 | 175 |