Your SlideShare is downloading. ×
A26 MariaDB : The New&Implemented MySQL Branch by Colin Charles
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.


Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

A26 MariaDB : The New&Implemented MySQL Branch by Colin Charles


Published on

Published in: Technology

  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. MariaDB 5.5 and what comes next Colin Charles, Monty Program Ab | colin@mariadb.orghttp:/ / | http:/ / / | @bytebot on Twitter DB Tech Showcase, K.K.Ashisuto, Tokyo, Japan 18 October 2012
  • 2. whoamiMariaDB guy at Monty Program AbFormerly MySQL AB/Sun MicrosystemsPast lives included Fedora Project (FESCO),
  • 3. Aims32 months, four major releases(5.1,5.2,5.3,5.5) & more (Galera Cluster, 10.0)Discuss the broader MySQL ecosystemThe future of MariaDB
  • 4. MariaDB is... (currently) Community developed Feature enhanced a better MySQL Fully compatible with MySQL not a fork feature complete
  • 5. OwnershipMySQL (database) owned by MySQL AB(company) -> Sun -> OracleMonty Program is just a (major) sponsor ofMariaDBmaria-captains: 50% MP, 50% communityincluding Sphinxsearch, Twitter, SkySQL,Taobao, Facebook, Percona, Codership, & more
  • 6. Aims of MariaDB100% compatible, drop-in replacement toMySQL 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 regressionsGPLv2
  • 7. Compatibility with MySQLNDB cluster included, XtraDB enabled bybut not enabled by default now. InnoDBdefault included too & may change to defaultClient libraries, clientserver protocol, SQL MariaDB Galera Clusterdialect, master-slave is a separate downloadreplication all same files supported as v/mariadb-versus-long as same versions mysql-compatibility
  • 8. XtraDBENGINE=InnoDB usesXtraDB by defaultLess checkpointing(smoother), lessflushing to disk,stable performance
  • 9. MariaDB 5.5GA April 2012 release: MariaDB 5.5.27By far the most popular release of MariaDBdownloaded, in use, today
  • 10. MariaDB 5.5: anopensource threadpoolModified from 5.1 No minimization of(libevent based), great concurrent transactionsfor CPU bound loads with dynamic pool sizeand short runningqueriesWindows (threadpool),Linux (epoll), Solaris(event ports), FreeBSD/OSX (kevents)
  • 11. MariaDB 5.5: Better for DBAs non-blocking client library fast node.js driver available: mariasql start operation, do work in thread, SELECT now has LIMIT operation processed, ROWS EXAMINED to result travels back consume less resources use cases: multiple SELECT * from t1, queries against single t2 LIMIT 10 ROWS server (utilize more EXAMINED 1000; CPUs); queries against multiple servers (SHOW STATUS on many machines)
  • 12. That’s it?From December 2010 to April 2012, 3 features for a 16 month delay?!?
  • 13. MariaDB 5.3Biggest change in the optimizer since it waswritten - more complete than MySQL 5.6!!!Replication improvementsReleased February 2012Based on the MySQL 5.1 codebase
  • 14. Better replicationOriginal statements logged with row basedreplication (RBR) eventsChecksum for binlog eventsRBR works for tables with no primary keyConsistent snapshot between storage engines
  • 15. Group commit in the binary logsync_binlog=1, commit-for-the-binary-log
  • 16. MariaDB 5.3: GIS support!MySQL has OpenGIS SFS (Simple featureaccess, SQL access method)Now, SQL with full geometry typesST_ prefix
  • 17. 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)
  • 18. Subquery optimizations Semi-join Goodbye rewriting as optimization, JOINs or separate materialization for queries non-correlated IN queries, subquery cache DBT-3, 60M rows, 29GB XtraDB
  • 19. Welcome MySQL 5.6Instant EXPLAIN EXPLAIN &Optimizertracing...
  • 20. Progress reportingFor ALTER TABLE or LOAD DATA INFILEMariaDB [mail]> alter table mail engine = maria;Stage: 1 of 2 copy to tmp table 17.55% of stage doneMariaDB [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)
  • 21. NoSQL access methodsComes with HandlerSocket direct access to XtraDB/InnoDB for CRUD operationsDynamic columns create columns with dynamic content basically a blob with handling functions
  • 22. MariaDB 5.2Released November 2011Pluggable authentication w/PAM pluginUser statistics: CLIENT_STATISTICS,USER_STATISTICS, INDEX_STATISTICS,TABLE_STATISTICS (userstats=1)Virtual columns - PERSISTENT or VIRTUAL
  • 23. Still using MyISAM?Mitigates thread contention for key cachelock, with notable performance improvementsKey caches divided into different segments,allowing for better key cache concurrency1-64 segments
  • 24. SphinxSECREATE TABLE t1 (..) instead of WHERE,ENGINE=SPHINX ORDER BY, LIMITCONNECTION=”sphinx://localhost:9312/test”; Sphinx is optimized/ fast for these tasksEngine connects toSphinx searchd Most of the Sphinx API is exposed toLet indexing, searching, enginesorting, filtering beperformed by Sphinx JOIN search table with other MySQL tables
  • 25. MariaDB 5.1Arrived February 2010Storage engines: XtraDB, FederatedX, PBXT*,OQGRAPH*, Aria, etc.microslow patch, processlist w/microsecondprecisiontable elimination
  • 26. What is Aria?Still just a crash-safe MyISAMused for temporary tables internallygroup commit added in 5.2 to speed upmulti-user inserts
  • 27. How do we support all this? Support LatestVersion Released MySQL till release5.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.655.5.23 Apr 2012 Apr 2017 5.5.27 5.5.27
  • 28. Oh, and we’re fast Oracle loves MySQL performance on Microsoft Windows. So do weOLTP read-only OLTP write-only
  • 29. How open is MariaDB?Mailing lists: Launchpad http:// maria- maria/ developers@lists.lau Bugs database/feature worklog: Jira maria- discuss@lists.launchp http:// t/Code hosting:Launchpad #maria on freenode
  • 30. Knowledgebase
  • 31. Deployments! happy users:, wabtec, Paybox Services, “We made the switch on OLX, Jelastic, Web of Trust, SaltOS, ERP5, etc. Saturday -- and we’re seeing“MariaDB had these same bugs that we ran into benefits already -- our dailywith MySQL. However the big difference was optimization time is down fromthat when we reported these bugs, they were 24 minutes to just 4 minutes” --quickly resolved within 48 hours!” -- Dreas van Ali Watters, CEO, travelblog.orgDonselaar, Chief Technology Officer, SpamExpertsB.V. after migrating over 300 servers fromMySQL 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 providing MariaDB to over 7,000 of their web hosting customers.
  • 32. Getting MariaDB has repositories(APT,YUM) & regular downloadsOpenSUSE build serviceGentoo, FreeBSD, Homebrew, Mageia, manydistributions
  • 33. We have a book
  • 34. Other branchesMySQL Percona MariaDB MySQL Percona MariaDB5.5.20 7.7M 61M 5.5.20 222299 15878435.5.22 16M 60M 5.5.22 438567 1540932
  • 35. What are we missingfrom Percona Server?percona_innodb_buffer_pool_shm - requiresbig shmax not default on many systemspercona_log_slow_query_log-log_slow_verbosity - InnoDB filteringinformation not fully in MariaDBDisabled test suite is awesome resource :)
  • 36. Faster even? read only? InnoDB/XtraDB is fineInnoDB has higher throughput, but stalls & checkpoints w/ high write load
  • 37. Track recordWe found the latest MySQL security bug and MariaDB was first tobe patched (sql/password.c & memcmp())We don’t like regressions mysql-5525 partitioned-tables-mysql-5523We care about backward compatibility & introduce featurescarefully XtraDB innodb_adaptive_checkpoint=none|reflex|estimate| keep_average (no more reflex...)
  • 38. We care about qualityAutomated test suite run upon every pushBetter QA & code coverageMySQL test cases: 1,765Percona Server test cases: 1,837MariaDB test cases: 2,180
  • 39. User stats plugin Disabled by default, consider enabling it to show use! from over 85 countries!
  • 40. 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.
  • 41. FutureMySQL 5.6 just RC, we have most features in 5.5MariaDB 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!
  • 42. MariaDB Galera Cluster Now in Scale your read & write ALPHA!workloads, automatically, without the need for NDB Cluster!
  • 43. partners with K.K.Ashisuto for bestlocal support!Monty Program does developer support &NRE support/
  • 44. We’re incredibly socialfacebook: @mariadbgoogle plus: also have a LinkedIn group
  • 45. Q&A | colin@mariadb.orghttp:/ / | http:/ / @bytebot | url: