41
MariaDB 5.5 and what comes next Colin Charles, Monty Program Ab [email protected] | [email protected] http://montyprogram.com / | http://mariadb.org / http://bytebot.net/blog/ | @bytebot on Twitter Percona Live NYC, New York, USA 2 October 2012

MariaDB 5.5 and what comes next - Percona Live NYC 2012

Embed Size (px)

DESCRIPTION

Find out what we did in MariaDB 5.5, and what our plans are for MariaDB going forward.

Citation preview

Page 1: MariaDB 5.5 and what comes next - Percona Live NYC 2012

MariaDB 5.5 and what comes next

Colin Charles, Monty Program [email protected] | [email protected]

http://montyprogram.com/ | http://mariadb.org/http://bytebot.net/blog/ | @bytebot on Twitter

Percona Live NYC, New York, USA2 October 2012

Page 2: MariaDB 5.5 and what comes next - Percona Live NYC 2012

whoami

MariaDB guy at Monty Program Ab

Formerly MySQL AB/Sun Microsystems

Past lives included Fedora Project (FESCO), OpenOffice.org

Page 3: MariaDB 5.5 and what comes next - Percona Live NYC 2012

Aims

32 months, four major releases (5.1,5.2,5.3,5.5) & more (Galera Cluster, 10.0)

Discuss the broader MySQL ecosystem

The future of MariaDB

Page 4: MariaDB 5.5 and what comes next - Percona Live NYC 2012

MariaDB is... (currently)

Community developed

Feature enhanced

branch of MySQL with more

Backwards compatible

not a fork

feature complete

Page 5: MariaDB 5.5 and what comes next - Percona Live NYC 2012

Ownership

MySQL (database) owned by MySQL AB (company) -> Sun -> Oracle

Monty Program is just a (major) sponsor of MariaDB

maria-captains: 50% MP, 50% community including Sphinxsearch, Twitter, SkySQL, Taobao, Facebook, Percona, Codership, & more

Page 6: MariaDB 5.5 and what comes next - Percona Live NYC 2012

Compatibility with MySQL

NDB cluster included, but not enabled by default

Client libraries, client server protocol, SQL dialect, master-slave replication all same

Data files supported as long as same versions

XtraDB enabled by default now. InnoDB included too & may change to default

MariaDB Galera Cluster is a separate download

http://kb.askmonty.org/v/mariadb-versus-mysql-compatibility

Page 7: MariaDB 5.5 and what comes next - Percona Live NYC 2012

MariaDB 5.5

GA April 2012

https://kb.askmonty.org/en/what-is-mariadb-55/

Current release: MariaDB 5.5.27

By far the most popular release of MariaDB downloaded, in use, today

Page 8: MariaDB 5.5 and what comes next - Percona Live NYC 2012

MariaDB 5.5: an opensource threadpool

Modified from 5.1 (libevent based), great for CPU bound loads and short running queries

Windows (threadpool), Linux (epoll), Solaris (event ports), FreeBSD/OSX (kevents)

No minimization of concurrent transactions with dynamic pool size

Page 9: MariaDB 5.5 and what comes next - Percona Live NYC 2012

MariaDB 5.5: Better for DBAs

non-blocking client library

start operation, do work in thread, operation processed, result travels back

use cases: multiple queries against single server (utilize more CPUs); queries against multiple servers (SHOW STATUS on many machines)

SELECT now has LIMIT ROWS EXAMINED to consume less resources

SELECT * from t1, t2 LIMIT 10 ROWS EXAMINED 1000;

Page 10: MariaDB 5.5 and what comes next - Percona Live NYC 2012

That’s it?From December 2010 to April 2012, 2 features

for a 16 month delay?!?

Page 11: MariaDB 5.5 and what comes next - Percona Live NYC 2012

MariaDB 5.3

Biggest change in the optimizer since it was written

Replication improvements

Released February 2012

Based on the MySQL 5.1 codebase

Page 12: MariaDB 5.5 and what comes next - Percona Live NYC 2012

Better replication

Original statements logged with row based replication (RBR) events

Checksum for binlog events

RBR works for tables with no primary key

Consistent snapshot between storage engines

Page 14: MariaDB 5.5 and what comes next - Percona Live NYC 2012

MariaDB 5.3: GIS support!

MySQL has OpenGIS SFS (Simple feature access, SQL access method)

Now, SQL with full geometry types

ST_ prefix

http://kb.askmonty.org/en/gis-features-in-533

Page 15: MariaDB 5.5 and what comes next - Percona Live NYC 2012

Optimizer enhancementsJoin additions

block nested loop joins for outer-joins, block hash joins, Batched Key Access (BKA)

Optimization for derived tables & views

mergeable derived tables processed like VIEWs + optimizer creates indexes over materialized derived tables

Disk access optimization

ICP, MRR

Page 16: MariaDB 5.5 and what comes next - Percona Live NYC 2012

Subquery optimizations

Semi-join optimization, materialization for non-correlated IN queries, subquery cache

Goodbye rewriting as JOINs or separate queries

DBT-3, 60M rows, 29GB XtraDB

Page 18: MariaDB 5.5 and what comes next - Percona Live NYC 2012

Progress reportingFor ALTER TABLE or LOAD DATA INFILE

MariaDB [mail]> alter table mail engine = maria;

Stage: 1 of 2 'copy to tmp table' 17.55% of stage done

MariaDB [mail]> select id, user, db, command, state,

-> time_ms, progress from information_schema.processlist;

+---------+-------------------+-----------+----------+

| command | state | time_ms | progress |

+---------+-------------------+-----------+----------+

| Query | copy to tmp table | 23407.131 | 17.551 |

+---------+-------------------+-----------+----------+

1 row in set (0.47 sec)

Page 19: MariaDB 5.5 and what comes next - Percona Live NYC 2012

NoSQL access methods

Comes with HandlerSocket

direct access to XtraDB/InnoDB for CRUD operations

Dynamic columns

create columns with dynamic content

basically a blob with handling functions

Page 20: MariaDB 5.5 and what comes next - Percona Live NYC 2012

MariaDB 5.2

Released November 2011

Pluggable authentication w/PAM plugin

User statistics: CLIENT_STATISTICS, USER_STATISTICS, INDEX_STATISTICS, TABLE_STATISTICS (userstats=1)

Virtual columns - PERSISTENT or VIRTUAL

SphinxSE storage engine started shipping

Page 21: MariaDB 5.5 and what comes next - Percona Live NYC 2012

Still using MyISAM?

Mitigates thread contention for key cache lock, with notable performance improvements

Key caches divided into different segments, allowing for better key cache concurrency

1-64 segments

Page 22: MariaDB 5.5 and what comes next - Percona Live NYC 2012

MariaDB 5.1

Arrived February 2010

Storage engines: XtraDB, FederatedX, PBXT*, OQGRAPH*, Aria, etc.

microslow patch, processlist w/microsecond precision

table elimination

Page 23: MariaDB 5.5 and what comes next - Percona Live NYC 2012

How do we support all this?

Version Released Support till

Latest release MySQL

5.1.42 Feb 2010 Feb 2015 5.1.62 5.1.63

5.2.3 Nov 2010 Nov 2015 5.2.12 5.1.63

5.3.5 Feb 2012 Feb 2017 5.3.8 5.1.65

5.5.23 Apr 2012 Apr 2017 5.5.27 5.5.27

Page 24: MariaDB 5.5 and what comes next - Percona Live NYC 2012

Oh, and we’re fast

Oracle loves MySQL performance on Microsoft Windows. So do we

OLTP read-only OLTP write-only

Page 26: MariaDB 5.5 and what comes next - Percona Live NYC 2012

Knowledgebase

Page 27: MariaDB 5.5 and what comes next - Percona Live NYC 2012

Deployments!

“MariaDB had these same bugs that we ran into with MySQL. However the big difference was that when we reported these bugs, they were quickly resolved within 48 hours!” -- Dreas van Donselaar, Chief Technology Officer, SpamExpertsB.V. after migrating over 300 servers from MySQL 5.0 to MariaDB 5.1.

“Migrating from MySQL 5.1 to MariaDB 5.2 was as simple as removing MySQL RPMs and installing the MariaDB packages, then running mysql_upgrade.” - Panayot Belchev, proprietor, Host Bulgaria on providingMariaDB to over 7,000 of their web hosting customers.

“We made the switch on Saturday -- and we’re seeing benefits already -- our daily

optimization time is down from 24 minutes to just 4 minutes” -- Ali Watters, CEO, travelblog.org

happy users: pap.fr, wabtec, Paybox Services, OLX, Jelastic, Web of Trust, SaltOS, ERP5, etc.

Page 28: MariaDB 5.5 and what comes next - Percona Live NYC 2012

Getting MariaDB

http://mariadb.org/ has repositories (APT,YUM) & regular downloads

OpenSUSE build service

Gentoo, FreeBSD, Homebrew, Mageia, many distributions

http://kb.askmonty.org/v/distributions-which-include-mariadb

Page 29: MariaDB 5.5 and what comes next - Percona Live NYC 2012

We have a book

Page 30: MariaDB 5.5 and what comes next - Percona Live NYC 2012

Other branches

MySQL Percona MariaDB

5.5.20 7.7M 61M

5.5.22 16M 60M

MySQL Percona MariaDB

5.5.20 222299 1587843

5.5.22 438567 1540932

Page 31: MariaDB 5.5 and what comes next - Percona Live NYC 2012

What are we missing from Percona Server?

percona_innodb_buffer_pool_shm - requires big shmax not default on many systems

percona_log_slow_query_log-log_slow_verbosity - InnoDB filtering information not fully in MariaDB

Disabled test suite is awesome resource :)

Page 32: MariaDB 5.5 and what comes next - Percona Live NYC 2012

percona_suppress_log_warning_1592

percona_log_slow_slave_statements

percona_log_slow_slave_statements-and-use_global_long_query_time

percona_slow_query_log-control_global_slow

percona_slow_query_log-microseconds_in_slow_query_log

percona_query_cache_with_comments

percona_query_cache_with_comments_prepared_statements

percona_show_temp_tables

percona_slow_query_log-use_global_long_query_time

percona_query_cache_with_comments_disable

percona_log_connection_error

percona_query_response_time

percona_query_response_time-stored

percona_sql_no_fcache

percona_status_wait_query_cache_mutex

percona_slave_innodb_stats

percona_query_response_time-replication

percona_server_variables_debug

percona_server_variables_release

percona_log_warnings_suppress

percona_slow_extended-log_slow_sp_statements-cl

percona_slow_extended-log_slow_verbosity-cl

slow_query_log_use_global_control

percona_slow_extended-use_global_control

percona_slow_query_log-log_slow_verbosity

percona_slow_extended-log_slow_verbosity

percona_slow_extended-microseconds_in_slow_extended

percona_slow_extended-use_global_long_query_time

percona_slow_extended-slow_query_log_timestamp_always-cl

percona_slow_extended-slow_query_log_microseconds_timestamp-cl

percona_bug643149

percona_processlist_row_stats

percona_server_variables_debug

percona_slow_extended-slave_statements

percona_show_slave_status_nolock

percona_slow_extended-slave_innodb_stats

percona_slow_extended-slave_statements-and-use_global_long_query_time

userstat_bug602047

percona_innodb_expand_fast_index_creation

percona_innodb_kill_idle_trx

percona_innodb_kill_idle_trx_locks

Page 33: MariaDB 5.5 and what comes next - Percona Live NYC 2012

Faster even?read only? InnoDB/XtraDB is fine

InnoDB has higher throughput, but stalls & checkpoints w/high write load

Page 34: MariaDB 5.5 and what comes next - Percona Live NYC 2012

Track record

We found the latest MySQL security bug and MariaDB was first to be patched (sql/password.c & memcmp())

We don’t like regressions

http://www.skysql.com/blogs/hartmut/nasty-innodb-regression-mysql-5525

We care about backward compatibility & introduce features carefully

XtraDB innodb_adaptive_checkpoint=none|reflex|estimate|keep_average (no more reflex...)

Page 35: MariaDB 5.5 and what comes next - Percona Live NYC 2012

User stats plugin

Disabled by default, consider enabling it to show use! http://mariadb.org/feedback_plugin/

data from over 85 countries!

Page 36: MariaDB 5.5 and what comes next - Percona Live NYC 2012

We love the community

Tokutek’s TokuDB ships with MariaDB too

groonga is to be merged

We’re looking at spider next

Multiple software packages talk about us (as an alternative to MySQL): Drupal, MediaWiki, Plone, phpMyAdmin, WordPress, etc.

Page 37: MariaDB 5.5 and what comes next - Percona Live NYC 2012

FutureMySQL 5.6 just RC, we have most features in 5.5

MariaDB 10.0

new InnoDB inside MariaDB (done)

Global transaction ID support

Multi-source replication (done)

Enhanced semisync replication

Persistent InnoDB statistics (done)

Cassandra Storage Engine (done), HBase Storage Engine

Page 38: MariaDB 5.5 and what comes next - Percona Live NYC 2012

MariaDB Galera Clusterhttp://kb.askmonty.org/en/galera/

Now in ALPHA!

Page 39: MariaDB 5.5 and what comes next - Percona Live NYC 2012

Support

mariadb.org/service-providers/

SkySQL, Percona, FromDual, PalominoDB, OpenQuery

Monty Program does developer support & NRE

http://montyprogram.com/developer-support/

Page 40: MariaDB 5.5 and what comes next - Percona Live NYC 2012

We’re incredibly social

facebook: fb.com/MariaDB.dbms

twitter: @mariadb

google plus: gplus.to/mariadb

we also have a LinkedIn group