Why MariaDB?

Click here to load reader

  • date post

    26-Jan-2015
  • Category

    Technology

  • view

    119
  • download

    3

Embed Size (px)

description

The myriad reasons why you want to use MariaDB over stock MySQL. Current up to MariaDB 5.3, and presented at Percona Live London 2011.

Transcript of Why MariaDB?

  • 1. Why MariaDB? Colin Charles, Monty Program [email protected]://montyprogram.com / http://mariadb.org/http://bytebot.net/blog / @bytebot on TwitterPercona Live London 2011 25 October 2011

2. Aims Give you an update of what weve donewith MariaDB Discuss the broader MySQL ecosystem 3. What is it? A branch of MySQL with more features? A branch of MySQL with better features? A fork? 4. MariaDB is... Community Developed Feature Enhanced Backward Compatible 5. Whos behind it? MySQL (database) owned by MySQL AB(company) Monty Program is just a sponsor ofMariaDB maria-captains: 64% Monty Program, 36%community (+16% MP 3Q/2011) 6. When did this begin? Sun buys MySQL AB in January 2008 Oracle proposes acquisition of SunMicrosystems in April 2009 Widenius decides that beyond the engine(Febuary 2009), focus on MariaDB, acomplete database solution 7. Why MariaDB? MySQL - an open source product orproject? MariaDB is an open source project 8. Aims of MariaDB 100% compatible, drop-in replacement toMySQL Stable (bug-free) releases GPLv2 9. Compatibility with MySQL There is no NDB cluster Tools are similar (somestorage engine additional tools for Aria, PBXT) Client libraries, client-server protocol, SQL XtraDB enabled by default;dialect, replication master- InnoDB and InnoDB pluginslave all similarare included, but not enabled by default Data les are supported aslong as its similar between http://kb.askmonty.org/v/versions mariadb-versus-mysql- compatibility 10. Whats in MariaDB 5.1 Released February 2010 Croatian collations Create external Numerous bug xesbuildsystem usingBuildbot + VMs for test Test cases and coverage+builds improvements Release lled with Removal of mutexesstorage engines Compiler warnings gone! XtraDB, PBXT,FederatedX, (M)Aria 11. Whats in MariaDB 5.1 XtraDB http://(ENGINE=InnoDB)www.percona.com/docs/ wiki/percona- enhanced InnoDBxtradb:startdesigned to betterscale on modernhardware; backwardcompatible, scalebetter on manycores, use memorymore efciently 12. Whats in MariaDB 5.1 PrimeBase PBXT Rollback transactions, recovery after restart Transactional, foreign very fast (identies garbage making undokeys, ACID, MVCC (readw/o locking) unnecessary) Row-level locking during Write once w/log-based(SELECT FOR) UPDATEstorage; write data to DB, without rst writing in transaction log http://kb.askmonty.org/v/ about-pbxt 13. Whats in MariaDB 5.1 Extended statistics for slow PROCESSLIST withquery logmicrosecond precision based on microslow TIME_MS infrom Percona http:// INFORMATION_SCHkb.askmonty.org/v/ EMA.PROCESSLISTslow-query-log-http://kb.askmonty.org/extended-statisticsv/time_ms-column-in- information_schemapr ocesslist 14. Whats in MariaDB 5.1 Table elimination Pool of threads (MySQL 6backport) Query highlynormalised data, it is Use a limited set ofsometimes possible to threads to handle allresolve a query queries vs one-thread-without accessing someper-connection. Win iftables the query refers most queries are shortto e.g. http:// running, and there arekb.askmonty.org/v/few table/row locks.what-is-table-http://kb.askmonty.org/elimination v/pool-of-threads 15. Whats in MariaDB 5.2 Released November 2010 Use socket_peercred - if alreadylogged in via Unix credentials, MariaDB 5.2.8 (MariaDB 5.1.55 - MariaDB will trust itchanges up to MySQL 5.1.55) http://kb.askmonty.org/v/ Pluggable authenticationdevelopment-pluggable-authentication authentication of users handled byplugins User Statistics (userstatsv2) mysql_native_password (20 byte)Percona, Google, Weldon Whipple.and mysql_old_password (8 byte) Understand server activity better,included by default identify database loads http://kb.askmonty.org/v/user-statistics CREATE USER foo IDENTIFIED VIAmysql_native_password USINGClient, user, index, table statisticspass; == CREATE user fooIDENTIFIED BY PASSWORDpass; 16. Whats in MariaDB 5.2 Segmented MyISAMkeycache mitigates threadcontention for keycache lock, withnotable 250%performanceimprovementshttp://kb.askmonty.org/v/segmented-key-cache 17. MariaDB 5.2: SphinxSE CREATE TABLE t1 (..) monitor it - SHOWENGINE=SPHINXENGINE SPHINXCONNECTION=sphinSTATUS;x://localhost:9312/test; can JOIN a SphinxSE SELECT * from t1 search table and tablesWHERE query=testusing other engines asit;mode=any;well matching modes, https://kb.askmonty.org/limits, lters, ranges v/about-sphinxsesupported 18. MariaDB 5.3: NoSQL HandlerSocket Dynamic columns direct access to different set ofInnoDB/XtraDBvirtual columns for each row in your no SQL, simple tableCRUD operations ontables store different attributes for each item (see: e- commerce shops) 19. MariaDB 5.3: DynamicColumns 20. MariaDB 5.3: group commit Group commit for the binary log https://www.facebook.com/note.php? note_id=10150261692455933sync_binlog=1, innodb_ush_log_at_trx_commit=1 http://kb.askmonty.org/en/group-commit- for-the-binary-log 21. MariaDB 5.3:replication Checksums for binlog mysqldump --single-events (5.6 backport)transaction --master- data => non-blocking START TRANSACTIONbackup! (new slave provisioning?) WorksWITH CONSISTENTSNAPSHOT works w/w/XtraDB+PBXTbinlog row-based replication obtain binlog pos. w/o for tables w/no primary keyblocking otherqueries 22. MariaDB 5.3 Progress reporting for disk access: IndexALTER TABLE/LOAD Condition PushdownDATA INFILE(ICP), Multi-Range Read (MRR) join: Classic Hash mytop included Join, Batched Key Access (ordered Optimiser changesretrievals via MRR), and many many more @@optimizer_switcoptimizationsh ags (default=off) 23. MariaDB 5.3:Subqueries nally! DBT-3, 60M line item optimizer_switch=semijrows, 29GB XtraDBoin=on /database materialization=onInstant EXPLAIN too! 24. MariaDB 5.3: User Feedback Plugin New phone homeplugin (works withPercona server, MySQL) disabled by default --please consider enablingit (feedback=on) http://mariadb.org/feedback_plugin/ 25. How open is MariaDB? Mailing lists: Launchpad http://launchpad.net/maria m[email protected] Bugs database:chpad.net https:// maria-bugs.launchpad.net/[email protected] maria/ad.net #maria on FreeNode Code hosting: IRCLaunchpad 26. Worklog Funding (bounties) Votes http://askmonty.org/worklog/ 27. Knowledgebase http://kb.askmonty.org/ 28. Deployments, deployments, deploymentshappy users: pap.fr, wabtec, Paybox Services, OLX, Jelastic, etc. We made the switch on Saturday -- and were seeing benets already -- ourMariaDB had these same bugs that we ran into daily optimization time is down fromwith MySQL. However the big difference was that 24 minutes to just 4 minutes -- Aliwhen we reported these bugs, they were quicklyWatters, CEO, travelblog.orgresolved within 48 hours! -- Dreas van Donselaar,Chief Technology Ofcer, SpamExpertsB.V. after migrating over 300 servers from MySQL5.0 to MariaDB 5.1. Migrating from MySQL 5.1 to MariaDB 5.2 was assimple as removing MySQL RPMs and installingthe MariaDB packages, then runningmysql_upgrade. - Panayot Belchev, proprietor,Host Bulgaria on providingMariaDB to over 7,000 of their web hostingcustomers. 29. Getting MariaDB http://mariadb.org/ is the site + downloads Get it via OpenSUSE build service Its in Gentoo, FreeBSD, Homebrew http://kb.askmonty.org/v/distributions-which-include-mariadb 30. The future? GIS Merging takes time Features (different implementations) makeit into upstream 31. We have a book 32. Support Monty Program does NRE/engineeringwork for MySQL/MariaDB (not L1/L2support) Support via capable service providers http://mariadb.org/service-providers/ Percona, FromDual, Open Query,SoftMethod GmbH, SkySQL 33. Q&A? email: [email protected]://montyprogram.com/ | http://mariadb.org/twitter: @bytebot / url: http://bytebot.net/blog/