June 19, 2013

Post: Percona XtraDB Cluster reference architecture with HaProxy

MySQL is checked via HTTP checks. MySQLmysql> grant process on *.* to ‘clustercheckuser’@'localhost’ identified by ‘clustercheckpassword!’; Query OK, 0 rows affected (0.00 sec) mysql> flush privileges; Query

Post: Checking for a live database connection considered harmful

…’ command at the MySQL protocol level, which will increment Com_admin_commands in SHOW GLOBAL STATUS, or a trivial query such as…. When you’re running 20k queries per second against your database server, an extra 20k queries per second to check whether the connection is… query latency. Every time you want to run a query, your app framework is doing a network round-trip to the database to check

Post: Upgrading MySQL

… just for this project. Query Validation It is often hard to ensure queries work same way with different MySQL version, unless you have… mk-upgrade tool to run comparison. The tool will run SELECT queries on both new and old MySQL installations and check result set, explain plan… Testing Running single stream of queries with good speed is not enough. You also need to perform stress testing to ensure both MySQL

Post: Modeling MySQL Capacity by Measuring Resource Consumptions

… safely run 0.7*16 ~= 12 queries per second. For some ideas about what factor may make sense for your system check out… per Query and compare it to estimated (or benchmarked) system performance to provide our estimates. If we’re running Innodb with MySQL we… get CPU consumption per query ? You can take a look at procfs for MySQL process: root@ubuntu:/var/log/mysql# cat /proc/19018…

Post: MySQL optimizer: ANALYZE TABLE and Waiting for table flush

…to get a better execution plan for another query we run ANALYZE TABLE: mysql> analyze table t; +——–+———+———-+———-+ | Table | Op | Msg_type |…table flush”. Conclusion Before running an ANALYZE table or any other command listed before, check the running queries. If the table that…

Post: Troubleshooting MySQL Memory Usage

… >> ps.log sleep 60 done Check for Table Cache Related Allocations There are cases when MySQL will allocate a lot of memory… if you’re using large blobs. It is easy to check though. Run “FLUSH TABLES” and see whenever memory usage goes down… Percona Server you can do better as you can query temporary tables too: mysql> select sum(data_length+index_length) from information…

Post: Eventual Consistency in MySQL

… we run this query and it returns a non-empty result set, it shows us which rows in Bar are orphans. mysql> INSERT… to generate quality control queries automatically, we can run them at any time: $ cat generate_foreign_key_checks.sql | mysql -N | mysql -E *************************** 1. row…

Post: Ultimate MySQL variable and status reference list

… to the amazing MySQL manual, especially the option and variable reference table…query_cache_limitblogpercona.commanual query_cache_min_res_unitblogpercona.commanual query_cache_sizeblogpercona.commanual query_cache_typeblogpercona.commanual query_cache_wlock_invalidateblogpercona.commanual query

Post: Reasons for MySQL Replication Lag

…) are frequent cause of concern. Remember replication runs as a single thread and something which…you have not yet installed something for graphing check out Cacti Tempates which have a lot … which queries mysql. I’ve seen monitoring updates which would add excessively expensive and frequent query on …

Post: Figuring out what limits MySQL Replication

… to check it based on slow query log, happily the server was running MySQL with slow query log with microsecond resolution so I could check exactly which update queries take…