Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introducing MariaDB 10.0

Introducing MariaDB 10.0

Talk given at SouthEast Linux Fest, June 7-9, 2013.

Daniel Bartholomew

June 08, 2013

More Decks by Daniel Bartholomew

Other Decks in Technology


  1. Introducing
    MariaDB 10.0

    View Slide

  2. Who Am I?

    Daniel Bartholomew
    – Sr. Technical Writer / Sys Admin for the MariaDB
    [email protected]
    – dbart on Freenode (#maria)
    – Twitter: @daniel_bart
    – Google+: http://gplus.to/dbart
    – Facebook: Not if I can help it.

    View Slide

  3. What is MariaDB?

    Started as branch of MySQL

    The project is ~50 months old

    Major Releases: 5.1, 5.2, 5.3, 5.5, Galera
    Cluster, MariaDB 10.0 (still alpha)

    Community Developed, Feature Enhanced,
    Backward Compatible

    Want more information?
    – Attend Max Mether's talk – MariaDB: MySQL With
    More Features – tomorrow at 09:00 in this room

    View Slide

  4. Why MariaDB 10.0?

    Blogs about why we are calling it MariaDB
    – http://blog.mariadb.org/what-comes-in-between-m
    – http://blog.mariadb.org/explanation-on-mariadb-10
    – http://blog.mariadb.org/mariadb-10-0-and-mysql-5-

    View Slide

  5. Why MariaDB 10.0?

    MariaDB & MySQL version numbers in 5.1 &
    5.5 are locked, which causes problems.

    For Example:
    – MariaDB & MySQL 5.1.44 buffer overflow flaw
    – Very serious bug so we fixed it immediately (in
    hours in the source, package release within a
    couple days)
    – MySQL also at 5.1.44, we couldn't use 5.1.45, so
    we numbered it as MariaDB 5.1.44b
    – MySQL fixed it in 5.1.45

    View Slide

  6. Why MariaDB 10.0?

    5.2 & 5.3 are easier to manage because we
    don't have to wait for MySQL or use non-
    standard version numbers

    Huge changes in MariaDB 5.3

    The 5.3 to 5.5 merge took almost a year

    In MariaDB 5.5 there are over 1.5 million lines
    of extra code, ~61MB diff

    MariaDB is not a patch set against MySQL

    Feature-for-feature, there are many

    View Slide

  7. Why MariaDB 10.0?

    MariaDB 5.5 has many features not in MySQL
    5.5 but which are in MySQL 5.6

    MySQL 5.6 refactored with huge losses in
    commit history

    Not all new 5.6 code is up to MariaDB

    Missing test cases

    Non-public bug reports

    View Slide

  8. Why MariaDB 10.0?





    View Slide

  9. MariaDB 10.0 Releases
    Date Version Status
    12 Nov 2012 10.0.0 Alpha
    6 Feb 2013 10.0.1 Alpha
    24 Apr 2013 10.0.2 Alpha
    ??? 10.0.3 Alpha

    View Slide

  10. MariaDB 10.0 in a Nutshell

    Built on MariaDB 5.5
    – You really should see Max's talk tomorrow.

    – Backported features (from MySQL 5.6)
    – Reimplemented features (from MySQL 5.6)
    – New features

    View Slide

  11. Backported Features



    Online ALTER TABLE

    – ORDER BY … LIMIT optimization

    View Slide

  12. Reimplemented Features

    Error messages (w/ system error string)

    DATETIME columns

    Global Transaction ID
    – kb.askmonty.org/en/global-transaction-id

    Parallel replication
    – mariadb.atlassian.net/browse/MDEV-4506

    View Slide

  13. New Features

    Multi-source Replication
    – Work from Taobao
    – Many users partition data across many
    masters… now you can replicate many
    masters to a single slave
    – Great for analytical queries, complete
    backups, etc…
    – kb.askmonty.org/en/multi-source-replication

    View Slide

  14. New Features

    EXISTS-TO-IN optimization
    – kb.askmonty.org/en/exists-to-in-optimization

    SHOW EXPLAIN for gets the
    query plan for a running statement
    – kb.askmonty.org/en/show-explain

    View Slide

  15. New Features

    Faster ALTER TABLE with unique keys for Aria and

    Per-thread memory usage (from Taobao)
    – SHOW STATUS has memory usage information
    – mariadb.atlassian.net/browse/MDEV-4011

    View Slide

  16. New Features

    Engine Independent persistent statistics
    – MySQL 5.6 has persistent statistics, but only for
    – MariaDB version is storage engine independent
    – Statistics are not limited by the storage engine
    API, and are used by the query optimizer to
    choose the best execution plan for each statement
    – Statistics are collected for non-indexed columns
    (unlike MySQL 5.6 InnoDB version)
    – mariadb.atlassian.net/browse/MDEV-4145

    View Slide

  17. New Features

    Support for atomic writes on FusionIO
    – kb.askmonty.org/en/fusion-io-introduction
    – kb.askmonty.org/en/fusionio-directfs-atomic-

    Better table discovery, so FederatedX has
    assisted discovery, Sequence engine (creates
    ascending / descending sequences, useful in

    View Slide

  18. New Features

    MariaDB as a “data platform”

    Cassandra storage engine
    – Apache Cassandra cluster seen as a
    storage engine to MariaDB
    – Read and Write to Cassandra using SQL
    – kb.askmonty.org/en/cassandra

    View Slide

  19. Cassandra Storage Engine

    View Slide

  20. Cassandra Storage Engine
    & etc...
    system logs
    audit logs
    web logs

    View Slide

  21. New Features

    CONNECT storage engine
    – Can read csv, dbf, ini, XML, ODBC, and
    – Combine (join) data between multiple data
    sources (for example, Cassandra &
    MariaDB & Oracle)
    – kb.askmonty.org/en/connect

    LevelDB storage engine
    – kb.askmonty.org/en/leveldb

    View Slide

  22. MariaDB 10.0 Upcoming Features

    SPIDER storage engine
    – spiderformysql.com

    TokuDB storage engine
    – kb.askmonty.org/en/tokudb

    Column level encryption via MyDiamo from
    Penta Security

    More Fusion-IO optimizations

    ??? – You can shape the roadmap

    View Slide

  23. MariaDB 10.0 Roadmap

    MariaDB is already a superset of features in

    MySQL 5.6 merge will be completed in two
    – 10.0.x
    – 10.1.x

    Plan is to have all important features of
    MySQL 5.6 with the first 10.1.x stable release
    – For all practical purposes MariaDB 10.1.x will be a
    drop-in replacement to MySQL 5.6

    View Slide

  24. FAQ – Replication

    Can I replicate from MySQL 5.6 to MariaDB 10.x?
    – Yes

    Can I replicate from MariaDB 10.x to MariaDB 5.5?
    – Yes

    Can I replicate from MariaDB 10.x to MySQL
    – No

    View Slide

  25. FAQ – Tools

    SELECT VERSION() returns 10.0.2-MariaDB

    Version string in handshake packet will be

    Tools should start recognizing MariaDB for
    additional feature-set (mytop, HeidiSQL,

    View Slide

  26. Resources

    MariaDB 10.0 Information:
    – https://kb.askmonty.org/en/what-is-mariadb-100/

    – http://blog.mariadb.org/

    View Slide

  27. Resources


    Bugs: http://mariadb.org/jira

    Mailing lists:
    [email protected]
    [email protected]

    Twitter: http://twitter.com/mariadb

    Google+: http://google.com/+mariadb

    Facebook: http://fb.com/MariaDB.dbms

    IRC: #maria on Freenode

    Knowledgebase: http://kb.askmonty.org

    Blog: http://blog.mariadb.org

    View Slide

  28. Benchmarks
    “Lies, damned lies, and statistics.”
    – Mark Twain

    View Slide

  29. Segmented MyISAM Keycache

    Solves major read bottlenecks for MyISAM

    MyISAM usage with many readers

    View Slide

  30. Batched Key Access speedups
    select max(1_extendedprice) from orders,
    lineitem where o_orderdate between $DATE1
    and $DATE2 and l_orderkey=o_orderkey;

    View Slide

  31. Group commit in the binary log
    Source: Mark Callaghan,

    View Slide

  32. Group commit in 10.0

    Even faster

    Slow fsync (removing checkpoint per commit saving 1-in-3 fsyncs)

    Fast fsync (reduced stall on LOCK_log gives speedup)

    View Slide

  33. 10.0 Group Commit vs MySQL 5.6

    MySQL 5.6 removes checkpoint per commit

    More complex thread scheduling, less grouping of commits

    Does not remove stall on LOCK_log, less grouping of commits

    View Slide

  34. Questions?

    View Slide