maria db the new mysql (colin charles)
TRANSCRIPT
![Page 1: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/1.jpg)
MariaDB: The New MySQL?
Colin Charles, Monty Program [email protected] | [email protected] http://montyprogram.com/ | http://mariadb.org/http://bytebot.net/blog/ | @bytebot on Twitter
HighLoad++, Moscow, Russia23 October 2012
![Page 2: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/2.jpg)
whoami
MariaDB guy at Monty Program Ab
Formerly MySQL AB/Sun Microsystems
Past lives included Fedora Project (FESCO), OpenOffice.org
![Page 3: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/3.jpg)
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: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/4.jpg)
First up...
Thank you Oracle & Percona and the larger MySQL community for continuing to do work that is great
![Page 5: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/5.jpg)
MariaDB is... (currently)
Community developed
Feature enhanced
a better MySQL
Fully compatible with MySQL
not a fork
feature complete
![Page 6: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/6.jpg)
Ownership
MySQL (database) owned by MySQL AB (company) -> Sun -> Oracle
Monty Program is a (major) sponsor of MariaDB
maria-captains: 50% MP, 50% community including Sphinxsearch, Twitter, SkySQL, Taobao, Facebook, Percona, Codership, & more
![Page 7: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/7.jpg)
Aims of MariaDB
100% compatible, drop-in replacement to MySQL
i.e. no changes in connectors, app doesn’t care its MariaDB unless using new features, easy upgrade (uninstall mysql, install mariadb, magic!)
Stable (bug-free) releases with no regressions
GPLv2
![Page 8: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/8.jpg)
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 9: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/9.jpg)
XtraDB
ENGINE=InnoDB uses XtraDB by default
Less checkpointing (smoother), less flushing to disk, stable performance
![Page 10: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/10.jpg)
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 11: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/11.jpg)
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 12: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/12.jpg)
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)
fast node.js driver available: mariasql
SELECT now has LIMIT ROWS EXAMINED to consume less resources
SELECT * from t1, t2 LIMIT 10 ROWS EXAMINED 1000;
![Page 13: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/13.jpg)
That’s it?From December 2010 to April 2012, 3
features for a 16 month delay?!?
![Page 14: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/14.jpg)
MariaDB 5.3
Biggest change in the optimizer since it was written - more complete than MySQL 5.6RC!!!
Replication improvements
Released February 2012
Based on the MySQL 5.1 codebase
![Page 15: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/15.jpg)
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 16: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/16.jpg)
Group commit in the binary log
sync_binlog=1, innodb_flush_log_at_trx_commit=1
https://www.facebook.com/note.php?note_id=10150261692455933
http://kb.askmonty.org/en/group-commit-for-the-binary-log
![Page 17: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/17.jpg)
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 18: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/18.jpg)
Optimizer enhancements
Join 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
Index Condition Pushdown (ICP), Multi-Range Read (MRR)
![Page 19: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/19.jpg)
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 20: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/20.jpg)
Welcome MySQL 5.6
Instant EXPLAIN
https://kb.askmonty.org/en/optimizer-feature-comparison-matrix/
![Page 21: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/21.jpg)
Progress reporting
For 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 22: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/22.jpg)
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 23: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/23.jpg)
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
![Page 24: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/24.jpg)
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 25: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/25.jpg)
SphinxSE
CREATE TABLE t1 (..) ENGINE=SPHINX CONNECTION=”sphinx://localhost:9312/test”;
Engine connects to Sphinx searchd
Let indexing, searching, sorting, filtering be performed by Sphinx
instead of WHERE, ORDER BY, LIMIT
Sphinx is optimized/fast for these tasks
Most of the Sphinx API is exposed to engine
JOIN search table with other MySQL tables
![Page 26: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/26.jpg)
MariaDB 5.1
Arrived February 2010
Storage engines: XtraDB, FederatedX, PBXT*, OQGRAPH*, Aria, etc.
microslow patch, processlist w/microsecond precision
table elimination
![Page 27: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/27.jpg)
What is Aria?
Still just a crash-safe MyISAM
used for temporary tables internally
group commit added in 5.2 to speed up multi-user inserts
![Page 28: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/28.jpg)
How do we support all this?
VersionRelease
dSupport
tillLatest release
MySQL
5.1.42Feb
2010Feb
20155.1.62 5.1.63
5.2.3Nov 2010
Nov 2015
5.2.12 5.1.63
5.3.5Feb
2012Feb
20175.3.8 5.1.65
5.5.23Apr
2012Apr
20175.5.28 5.5.28
![Page 29: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/29.jpg)
Oh, and we’re fast
Oracle loves MySQL performance on Microsoft Windows. So do we
OLTP read-only OLTP write-only
![Page 30: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/30.jpg)
How open is MariaDB?
Mailing lists: Launchpad
Code hosting: Launchpad
http://launchpad.net/maria/
Bugs database/feature worklog: Jira
http://mariadb.atlassian.net/
#maria on freenode
![Page 31: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/31.jpg)
Knowledgebase
![Page 32: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/32.jpg)
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 33: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/33.jpg)
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 34: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/34.jpg)
We have a book
![Page 35: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/35.jpg)
Other branches
MySQLPercon
aMariaD
B
5.5.20 7.7M 61M
5.5.22 16M 60M
MySQL
Percona
MariaDB
5.5.2022229
91587843
5.5.2243856
71540932
![Page 36: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/36.jpg)
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 resource
![Page 37: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/37.jpg)
Faster even?read only? InnoDB/XtraDB is fine
InnoDB has higher throughput, but stalls & checkpoints w/high write load
![Page 38: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/38.jpg)
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
http://www.skysql.com/blogs/kolbe/heads-no-more-query-cache-partitioned-tables-mysql-5523
We care about backward compatibility & introduce features carefully
XtraDB innodb_adaptive_checkpoint=none|reflex|estimate|keep_average (no more reflex...)
![Page 39: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/39.jpg)
We care about quality
Automated test suite run upon every push
Better QA & code coverage
MySQL test cases: 1,765
Percona Server test cases: 1,837
MariaDB test cases: 2,180
![Page 40: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/40.jpg)
User stats plugin
Disabled by default, consider enabling it to show use! http://mariadb.org/feedback_plugin/
data from over 85 countries!
![Page 41: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/41.jpg)
We love the community
Tokutek’s TokuDB ships with MariaDB too
groonga/spider may be merged next
Multiple software packages talk about us (as an alternative to MySQL): Drupal, MediaWiki, Plone, phpMyAdmin, WordPress, etc.
![Page 42: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/42.jpg)
Future
MySQL 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
virtual machine for Cassandra made by community!
![Page 43: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/43.jpg)
MariaDB Galera Cluster
http://kb.askmonty.org/en/galera/
Now in ALPHA!Now in ALPHA!Scale your read & write workloads, automatically, without
the need for NDB Cluster!
![Page 44: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/44.jpg)
Support
mariadb.org/service-providers/
SkySQL, Percona, PalominoDB, etc.
Monty Program does developer support & NRE
http://montyprogram.com/developer-support/
![Page 45: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/45.jpg)
We’re incredibly social
facebook: fb.com/MariaDB.dbms
twitter: @mariadb
google plus: gplus.to/mariadb
we also have a LinkedIn group
![Page 46: Maria db the new mysql (Colin Charles)](https://reader036.vdocuments.mx/reader036/viewer/2022081421/554f837db4c905d25b8b4b64/html5/thumbnails/46.jpg)
Q&[email protected] | [email protected] http://montyprogram.com/ | http://mariadb.org/ twitter: @bytebot | url: http://bytebot.net/blog/