{"id":3238,"date":"2013-03-06T05:00:07","date_gmt":"2013-03-05T19:00:07","guid":{"rendered":"http:\/\/www.flamingspork.com\/blog\/?p=3238"},"modified":"2013-03-05T20:56:22","modified_gmt":"2013-03-05T10:56:22","slug":"mariadb-code-size","status":"publish","type":"post","link":"https:\/\/www.flamingspork.com\/blog\/2013\/03\/06\/mariadb-code-size\/","title":{"rendered":"MariaDB code size"},"content":{"rendered":"<p>Continuing on from my previous post,\u00c2\u00a0<a title=\"Permalink to MySQL code size over releases\" href=\"http:\/\/www.flamingspork.com\/blog\/2013\/03\/05\/mysql-code-size\/\" rel=\"bookmark\">MySQL code size over releases<\/a>.<\/p>\n<p>I wanted to look at the different branches\/patch sets of MySQL out there and work out how far from upstream they deviated. I&#8217;m just going to compare against whatever upstream version the most easily accessible version is based on (be it 5.0.x, 5.1.x or whatever).<\/p>\n<p>For MariaDB versions, I removed innodb_plugin and replaced it with xtradb for stats purposes as the MariaDB innodb_plugin is essentially the same as upstream and I don&#8217;t want to artificially inflate the diff size.<\/p>\n<p>The first three major versions of MariaDB were all based on MySQL 5.1. I used sloccount and only counted C and C++ code.<\/p>\n<p>So, let&#8217;s look at some of the MySQL patch sets\/branches that are around. Firstly, let&#8217;s look at MariaDB:<\/p>\n<table>\n<thead>\n<tr>\n<td><strong>Codebase<\/strong><\/td>\n<td><strong>LoC (C, C++)<\/strong><\/td>\n<td><strong>+\/- from MySQL<\/strong><\/td>\n<td><strong>+\/- from prev maj Version<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>MariaDB 5.1<\/td>\n<td>1,210,168<\/td>\n<td>+157,532<\/td>\n<td>0<\/td>\n<\/tr>\n<tr>\n<td>MariaDB 5.2<\/td>\n<td>1,227,434<\/td>\n<td>+174,798<\/td>\n<td>+17,266 (since MariaDB 5.1)<\/td>\n<\/tr>\n<tr>\n<td>MariaDB 5.3<\/td>\n<td>1,264,995<\/td>\n<td>+212,359<\/td>\n<td>+37,561 (since MariaDB 5.2)<\/td>\n<\/tr>\n<tr>\n<td>MariaDB 5.5<\/td>\n<td>1,377,405<\/td>\n<td>+187,658 (from MySQL 5.5)<\/td>\n<td>+112,410 (since MariaDB 5.3)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>From my previous post on <a href=\"http:\/\/www.flamingspork.com\/blog\/2013\/03\/05\/mysql-code-size\/\">lines of code in MySQL versions<\/a>, we learned that with MySQL 5.6 we saw a 354kLOC increase over MySQL 5.5. What is quite surprising is how close some of the MariaDB differences are to this. With MariaDB 5.5, we&#8217;re looking at a 187kLOC difference, which is roughly two thirds that of MySQL 5.6. What&#8217;s also interesting is that each incremental MariaDB release has not added nearly as much code as the MySQL 5.1 to 5.5 and 5.5 to 5.6 jumps did.<\/p>\n<div style=\"width: 460px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"https:\/\/docs.google.com\/spreadsheet\/oimg?key=0Ar7e3-N2Y32IdHFGRWI2ODk4ZUY4TkhrclJSVC1mb3c&amp;oid=4&amp;zx=imt1yst694nh\" width=\"450\" height=\"320\" \/><p class=\"wp-caption-text\">MariaDB LoC over major versions<\/p><\/div>\n<p>The MariaDB code size has also been increasing, if we look at the graph above \u00c2\u00a0you can really see the jump in code size over the past few releases.<\/p>\n<p>If we look at the delta between MariaDB and MySQL, the first MariaDB release (MariaDB 5.1) was certainly a large jump. Each incremental MariaDB release (5.2 and 5.3) have been a smaller delta than the initial one. With MariaDB 5.5 we actually decrease the delta from MySQL, which is something that&#8217;s interesting to look at.<\/p>\n<p>If we were going a straight port of MariaDB 5.3 to be based off MySQL 5.5, we&#8217;d expect the delta to be around 137kLOC (what MySQL 5.1 to 5.5 is) but it isn&#8217;t. The difference to MariaDB 5.5 from MariaDB 5.3 is only ~112kLOC, and the on the whole delta decreases.<\/p>\n<p>But what makes up this big initial jump for MariaDB? Let&#8217;s look at some of the MariaDB 5.1 only modules and what&#8217;s left:<\/p>\n<table>\n<thead>\n<tr>\n<td><strong>MariaDB 5.1 component<\/strong><\/td>\n<td><strong>LoC (MariaDB 5.1)<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>PBXT<\/td>\n<td>45,107<\/td>\n<\/tr>\n<tr>\n<td>FederatedX<\/td>\n<td>3,076<\/td>\n<\/tr>\n<tr>\n<td>IBM DB2i<\/td>\n<td>13,486<\/td>\n<\/tr>\n<tr>\n<td><strong>Total<\/strong><\/td>\n<td>61,669<\/td>\n<\/tr>\n<tr>\n<td><strong>Other<\/strong><\/td>\n<td>95,863<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>So the MariaDB delta is not increase just because they included some existing modules, there&#8217;s more code in there, about as much as any major MySQL version bump.<\/p>\n<p>Tomorrow we look at other MySQL branches, and we see that the MariaDB delta truly is significantly larger than any other MySQL branch.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Continuing on from my previous post,\u00c2\u00a0MySQL code size over releases. I wanted to look at the different branches\/patch sets of MySQL out there and work out how far from upstream they deviated. I&#8217;m just going to compare against whatever upstream &hellip; <a href=\"https:\/\/www.flamingspork.com\/blog\/2013\/03\/06\/mariadb-code-size\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","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_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1,14],"tags":[340,628],"class_list":["post-3238","post","type-post","status-publish","format-standard","hentry","category-general","category-mysql","tag-mariadb","tag-mysql"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5a6n8-Qe","jetpack-related-posts":[{"id":3242,"url":"https:\/\/www.flamingspork.com\/blog\/2013\/03\/07\/other-mysql-code-size\/","url_meta":{"origin":3238,"position":0},"title":"Other MySQL branch code sizes\u00ef\u00bb\u00bf\u00ef\u00bb\u00bf","author":"Stewart Smith","date":"2013-03-07","format":false,"excerpt":"Continuing on from my previous posts,\u00c2\u00a0MySQL code size over releases\u00c2\u00a0and\u00c2\u00a0MariaDB code size\u00c2\u00a0I've decided to also look into some other code branches. I've used the same methodology as my previous few posts: sloccount for C and C++ code only. There are also other branches around in pretty widespread use (if only\u2026","rel":"","context":"In &quot;code&quot;","block_context":{"text":"code","link":"https:\/\/www.flamingspork.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3261,"url":"https:\/\/www.flamingspork.com\/blog\/2013\/03\/14\/so-what-about-the-diffstat-of-mariadb-compared-to-mysql\/","url_meta":{"origin":3238,"position":1},"title":"So what about the diffstat of MariaDB compared to MySQL?","author":"Stewart Smith","date":"2013-03-14","format":false,"excerpt":"So, I've looked at what sloccount says on the differences between Oracle MySQL over versions of itself and the various MySQL branches around. What I haven't looked at is the diffstat. Firstly, let's look at MariaDB. I'm going to look at MariaDB 5.5.29 as compared to MySQL 5.5.29, both checked\u2026","rel":"","context":"In &quot;code&quot;","block_context":{"text":"code","link":"https:\/\/www.flamingspork.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3263,"url":"https:\/\/www.flamingspork.com\/blog\/2013\/03\/15\/diffstat-of-mysql-5-6-versus-5-5\/","url_meta":{"origin":3238,"position":2},"title":"diffstat of MySQL 5.6 versus 5.5","author":"Stewart Smith","date":"2013-03-15","format":false,"excerpt":"Yesterday I wrote about what the diffstat between MySQL 5.5 and MariaDB 5.5 was, and previously to that, about the MariaDB code size as reported by sloccount. Let's look at MySQL 5.6. A naive wc based \"lines of code\" for MySQL 5.6 sql\/ directory is ~490kLOC which contasts with MySQL\u2026","rel":"","context":"In &quot;code&quot;","block_context":{"text":"code","link":"https:\/\/www.flamingspork.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3257,"url":"https:\/\/www.flamingspork.com\/blog\/2013\/03\/13\/which-is-bigger-mysql-or-postgresql\/","url_meta":{"origin":3238,"position":3},"title":"Which is bigger: MySQL or PostgreSQL?","author":"Stewart Smith","date":"2013-03-13","format":false,"excerpt":"From my previous posts, we have some numbers (excluding NDB) for the size of MySQL, so what about PostgreSQL? Here, I used PostgreSQL git trunk and classing things in the contrib\/ directory as plugins. I put the number of lines of code in the src\/backend\/storage directory down as storage engines\u2026","rel":"","context":"In &quot;code&quot;","block_context":{"text":"code","link":"https:\/\/www.flamingspork.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4019,"url":"https:\/\/www.flamingspork.com\/blog\/2015\/12\/18\/power8-accelerated-crc32-merged-in-mariadb-10-1\/","url_meta":{"origin":3238,"position":4},"title":"POWER8 Accelerated CRC32 merged in MariaDB 10.1","author":"Stewart Smith","date":"2015-12-18","format":false,"excerpt":"Earlier on in benchmarking MySQL and MariaDB on POWER8, we noticed that on write workloads (or read workloads involving a lot of IO) we were spending a bunch of time computing InnoDB page checksums. This is a relatively well known MySQL problem and has existed for many years and Percona\u2026","rel":"","context":"In &quot;IBM&quot;","block_context":{"text":"IBM","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/ibm-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2083,"url":"https:\/\/www.flamingspork.com\/blog\/2010\/07\/22\/a-tale-of-a-bug\/","url_meta":{"origin":3238,"position":5},"title":"A tale of a bug&#8230;","author":"Stewart Smith","date":"2010-07-22","format":false,"excerpt":"So I sometimes get asked if we funnel back bug reports or patches back to MySQL from Drizzle. Also, MariaDB adds some interest here as they are a lot closer (and indeed compatible with) to MySQL. With Drizzle, we have deviated really quite heavily from the MySQL codebase. There are\u2026","rel":"","context":"In &quot;code&quot;","block_context":{"text":"code","link":"https:\/\/www.flamingspork.com\/blog\/category\/code\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/3238","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/comments?post=3238"}],"version-history":[{"count":4,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/3238\/revisions"}],"predecessor-version":[{"id":3245,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/3238\/revisions\/3245"}],"wp:attachment":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/media?parent=3238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/categories?post=3238"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/tags?post=3238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}