{"id":3202,"date":"2016-04-08T18:07:34","date_gmt":"2016-04-08T10:07:34","guid":{"rendered":"http:\/\/www.bytebot.net\/blog\/?p=3202"},"modified":"2016-04-11T22:52:33","modified_gmt":"2016-04-11T14:52:33","slug":"fosdem-2016-notes","status":"publish","type":"post","link":"https:\/\/www.bytebot.net\/blog\/archives\/2016\/04\/08\/fosdem-2016-notes","title":{"rendered":"FOSDEM 2016 notes"},"content":{"rendered":"<p>While being on the <a href=\"http:\/\/www.mysqlandfriends.eu\/committee\/\">committee<\/a> for the <a href=\"http:\/\/www.mysqlandfriends.eu\/\">FOSDEM MySQL &amp; friends devroom<\/a>, I didn&#8217;t speak at that devroom (instead I spoke at the distributions devroom). But when I had time to pop in, I did take some notes on sessions that were interesting to me, so here are the notes. I really did enjoy Yoshinori Matsunobu&#8217;s session (out of the devroom) on RocksDB and MyRocks and I highly recommend you to <a href=\"https:\/\/fosdem.org\/2016\/schedule\/event\/facebook\/\">watch the video<\/a> as the notes can&#8217;t be very complete without the great explanation available in the slide deck. Anyway there are <a href=\"https:\/\/fosdem.org\/2016\/schedule\/track\/mysql_and_friends\/\">videos from the MySQL and friends devroom<\/a>.<\/p>\n<h1>MySQL &amp; Friends Devroom<\/h1>\n<h3>MySQL Group Replication or how good theory gets into better practice &#8211; Tiago Jorge<\/h3>\n<ul>\n<li>Multi-master <em>update everywhere<\/em> with built-in <em>automatic distributed recovery, conflict detection and group membership<\/em><\/li>\n<li>Group replication added 3 <code>PERFORMANCE_SCHEMA<\/code> tables <\/li>\n<li>If a server leaves the group, the others will be automatically informed (either via a crash or if you execute <code>STOP GROUP REPLICATION<\/code>)<\/li>\n<li>Cloud friendly, and it is self-healing. Integrated with server core via a well-defined API. GTIDs, row-based replication, <code>PERFORMANCE_SCHEMA<\/code>. Works with MySQL Router as well.<\/li>\n<li>Multi-master update everywhere. Conflicts will be detected and dealt with, via the first committer wins rule. Any 2 transactions on different servers can write to the same tuple.<\/li>\n<li>labs.mysql.com \/ mysqlhighavailability.com <\/li>\n<li>Q: When a node leaves a group, will it still accept writes? A: If you leave voluntarily, it can still accept writes as a regular MySQL server (this needs to be checked)<\/li>\n<li>Online DDL is not supported<\/li>\n<li>Checkout the <a href=\"https:\/\/fosdem.org\/2016\/schedule\/event\/mysql_group_repl\/\">video<\/a><\/li>\n<\/ul>\n<h3>ANALYZE for statements &#8211; Sergei Petrunia<\/h3>\n<ul>\n<li>a lot like EXPLAIN ANALYZE (in PostgreSQL) or PLAN_STATISTICS (in Oracle)<\/li>\n<li>Looks like explain output with execution statistics<\/li>\n<li><a href=\"https:\/\/fosdem.org\/2016\/schedule\/event\/analyze_mariadb\/\">slides and video<\/a><\/li>\n<\/ul>\n<h3>Preparse Query Rewrite Plugins &#8211; Sveta Smirnova \/ Martin Hansson<\/h3>\n<ul>\n<li>martin.hansson@oracle.com<\/li>\n<li>Query rewwriting with a proxy might be too complex, so they thought of doing it inside the server. There is a pre-parse (string-to-string) and a post-parse (parse tree) API. Pre-parse: low overhead, but no structure. Post-parse: retains structure, but requires re-parsing (no destructive editing), need to traverse parse tree and will only work on select statements<\/li>\n<li>Query rewrite API builds on top of teh Audit API, and then you&#8217;ve got the pre-parse\/post-parse APIs on the top that call out to the plugins<\/li>\n<li><a href=\"https:\/\/fosdem.org\/2016\/schedule\/event\/rewrite_plugin\/\">video<\/a><\/li>\n<\/ul>\n<h3>Fedora by the Numbers &#8211; Remy DeCausemaker<\/h3>\n<ul>\n<li>Over 200,000 downloads a month for Fedora (at least this is where they could installer downloads). Upgrades don&#8217;t need an installer download though!<\/li>\n<li><a href=\"https:\/\/github.com\/fedora-infra\/fedora-stats-tools\">https:\/\/github.com\/fedora-infra\/fedora-stats-tools<\/a><\/li>\n<\/ul>\n<h3>MyRocks: RocksDB Storage Engine for MySQL (LSM Databases at Facebook) &#8211; Yoshinori Matsunobu<\/h3>\n<ul>\n<li>SSD\/Flash is getting affordable but MLC Flash is still expensive. HDD has large capacity but limited IOPS (reducing rw IOPS is very important and reducing write is harder). SSD\/Flash has great read iops but limited space and write endurance (reducing space here is higher priority)<\/li>\n<li>Punch hole compression in 5.7, it is aligned to the sector size of your device. Flash device is basically 4KB. Not 512 bytes. So you&#8217;re basically wasting a lot of space and the compression is inefficient <\/li>\n<li>LSM tends to have a read penalty compared to B-Tree, like InnoDB. So a good way to reduce the read penalty is to use a Bloom Filter (check key may exist or not without reading data, and skipping read i\/o if it definitely does not exist)<\/li>\n<li>Another penalty is for delete. It puts them into tombstones. So there is the workaround called SingleDelete.<\/li>\n<li>LSMs are ideal for write heavy applications<\/li>\n<li>Similar features as InnoDB, transactions: atomicity, MVCC\/non-locking consistent read, read committed repeatable read (PostgreSQL-style), Crash safe slave and master. It also has online backup (logical backup by mysqldump and binary backup by myrocks_hotbackup).<\/li>\n<li>Much smaller space and write amplification compared to InnoDB<\/li>\n<li>Reverse order index (Reverse Column Family). SingleDelete. Prefix bloom filter. Mem-comparable keys when using case sensitive collations. Optimizer statistics for diving into pages.<\/li>\n<li>RocksDB is great for scanning forward but ORDER BY DESC queries are slow, hence they use reverse column families to make descending scan a lot faster<\/li>\n<li><a href=\"https:\/\/fosdem.org\/2016\/schedule\/event\/facebook\/\">watch the video<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>While being on the committee for the FOSDEM MySQL &amp; friends devroom, I didn&#8217;t speak at that devroom (instead I spoke at the distributions devroom). But when I had time to pop in, I did take some notes on sessions that were interesting to me, so here are the notes. I really did enjoy Yoshinori [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1064,23],"tags":[1812,242,2,1811,1781,1814,1775,1813,1810],"class_list":["post-3202","post","type-post","status-publish","format-standard","hentry","category-mariadb-databases","category-mysql","tag-analyze","tag-conference","tag-fedora","tag-group-replication","tag-mariadb-server","tag-myrocks","tag-mysql","tag-query-rewrite","tag-rocksdb"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p4vJD-PE","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"amp_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts\/3202","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/comments?post=3202"}],"version-history":[{"count":1,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts\/3202\/revisions"}],"predecessor-version":[{"id":3203,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/posts\/3202\/revisions\/3203"}],"wp:attachment":[{"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/media?parent=3202"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/categories?post=3202"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bytebot.net\/blog\/wp-json\/wp\/v2\/tags?post=3202"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}