June 19, 2013

Post: Is Synchronous Replication right for your app?

MySQL replication from this instance, since MySQL replication is asynchronous. What about semi-sync MySQL… cluster-wide is once per RTT. What about WAN clusters…keep track of global achievement statistics in a single table … some metadata: BEGIN; INSERT INTO users_groups (user_id, group_id) VALUES (…

Post: Google's user_statistics V2 port and changes

MySQL. Features includes: New statistics per user (Cpu_time, Bytes_received, Bytes_sent, etc) New command SHOW CLIENT_STATISTICS, which shows statistics per client’s hostname, not per user FLUSH USER_ and CLIENT_STATISTICS commands Our port includes: INFORMATION_SCHEMA tables – USER_STATISTICS, CLIENT_STATISTICS, INDEX_STATISTICS, TABLE_STATISTICS Access protection – USER_STATISTICS, CLIENT_STATISTICS

Post: MySQL extensions for hosting

… Callaghan’s MySQL patch bundle. They were extensions adding per-user and per-table accounting…users causing the most traffic to help you with some strategic decisions. Sample outputs: mysql> SHOW USER_STATISTICS LIKE ‘hosting2′\G *************************** 1. row *************************** User

Post: Modeling MySQL Capacity by Measuring Resource Consumptions

… CPU consumption per query ? You can take a look at procfs for MySQL process: root@ubuntu:/var/log/mysql# cat /proc/…average CPU usage per query. If you’re running Percona Server you can get the value from User Statistics *************************** 1. row *************************** USER:user TOTAL_…

Post: Investigating MySQL Replication Latency in Percona XtraDB Cluster

… –mysql-user=root –mysql-password=”" –oltp-table-size=1000000 –num-threads=1 –init-rng=on –max-requests=0 –max-time=300 run …. per-request statistics… running the same update statement on the different cluster node: per-request statistics: min: 0.69ms avg: 1.12ms max: 52334.76ms…

Post: Quickly finding unused indexes (and estimating their size)

…’s quite easy to collect statistics about index usage in Percona Server (and others) using the User Statistics patch.  By enabling ‘userstat_running’, we start to get information in the INFORMATION_SCHEMA.INDEX_STATISTICS table.  This… you use innodb_file_per_table, then you can rebuild the tablespace for your table by simply doing: mysql> alter table mytable…

Post: The new cool MySQL patch has landed! Check your queries performance!

… The final part are the InnoDB usage statistics. MySQL currently allows you to see many per-session statistics for operations with SHOW SESSION STATUS… instead the above statistics. The full slow log entry for a query using InnoDB can look like this: # User@Host: macko[macko... if InnoDB was not used: # Time: 071031 20:03:16 # User@Host: macko[macko] @ localhost [] # Thread_id: 12 # Query_time: 0…

Post: Identifying the load with the help of pt-query-digest and Percona Server

MySQL server, you would see an entry like this in the slow query log: # Time: 111229 3:02:26 # User… to have the statistics available after the query is actually executed, while no such statistics are available for…for which it has to examine 1012 rows (per every query), interesting here is that this …

Post: The perils of InnoDB with Debian and startup scripts

…’statistics‘ status. Why is that happening? Look at SHOW INNODB STATUS: ===================================== 090128 8:29:03 INNODB MONITOR OUTPUT ===================================== Per …500 mysql tables in use 7, locked 0 MySQL thread id 6424, query id 1579718 10.255.106.47 user statistics And…

Post: Checking for a live database connection considered harmful

… a call to the ‘ping’ or ‘statistics‘ command at the MySQL protocol level, which will increment Com_admin_… or so. When you’re running 20k queries per second against your database server, an extra … 0xA873BBC4583C4C85 278.4533 1.9% 6985 0.0399 SELECT users user_devices That’s right, 73% of the server’…