{"id":3237,"date":"2013-03-08T05:52:35","date_gmt":"2013-03-07T19:52:35","guid":{"rendered":"http:\/\/www.flamingspork.com\/blog\/?p=3237"},"modified":"2013-03-05T20:56:25","modified_gmt":"2013-03-05T10:56:25","slug":"mysql-modularity-are-we-there-yet","status":"publish","type":"post","link":"https:\/\/www.flamingspork.com\/blog\/2013\/03\/08\/mysql-modularity-are-we-there-yet\/","title":{"rendered":"MySQL modularity, are we there yet?"},"content":{"rendered":"<p>MySQL is now over four times the size than it was with MySQL 3.23. This has not come in the shape of plugins.<\/p>\n<p>Have we improved modularity over time? I decided to take LoC count for plugins and storage engines (in the case of Drizzle, memory, myisam and innobase are storage engines and everything else comes under plugin). I&#8217;ve <strong>excluded<\/strong> NDB from these numbers as it is rather massive and is pretty much still a separate thing.<\/p>\n<table>\n<thead>\n<tr>\n<td><strong>Version<\/strong><\/td>\n<td><strong>Total LoC<\/strong><\/td>\n<td><strong>Plugin LoC<\/strong><\/td>\n<td><strong>Storage Engines LoC<\/strong><\/td>\n<td><strong>Remaining (kernel)<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>MySQL 3.23.58<\/td>\n<td>371,987<\/td>\n<td>0 (0%)<\/td>\n<td>176,276<\/td>\n<td>195,711 (52% kernel)<\/td>\n<\/tr>\n<tr>\n<td>MySQL 5.1.68<\/td>\n<td>721,331<\/td>\n<td>228<\/td>\n<td>237,124<\/td>\n<td>483,979 (67% kernel)<\/td>\n<\/tr>\n<tr>\n<td>MySQL 5.5.30<\/td>\n<td>858,441<\/td>\n<td>2,706<\/td>\n<td>171,009<\/td>\n<td>684,726 (79% kernel)<\/td>\n<\/tr>\n<tr>\n<td>MySQL 5.6.10<\/td>\n<td>1,049,344<\/td>\n<td>29,122<\/td>\n<td>236,067<\/td>\n<td>784,155 (74% kernel)<\/td>\n<\/tr>\n<tr>\n<td>MariaDB 5.5<\/td>\n<td>1,142,118<\/td>\n<td>11,781<\/td>\n<td>304,015<\/td>\n<td>826,322 (72% kernel)<\/td>\n<\/tr>\n<tr>\n<td>Drizzle trunk<\/td>\n<td>334,810<\/td>\n<td>31,150<\/td>\n<td>130,727<\/td>\n<td>172,933 (51% kernel)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>I&#8217;ve used the non-plugin and non-storage engine code size to be the database &#8220;kernel&#8221; &#8211; i.e. the core of the database server.<\/p>\n<p>What I find really interesting here is that yes, the amount of code that is to some degree modular has increased. The amount of code that is a MySQL plugin is still very small compared to the server size<\/p>\n<p>Drizzle is 20-25% of the size of a modern MySQL or MariaDB server and for many applications does largely or exactly the same thing.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>MySQL is now over four times the size than it was with MySQL 3.23. This has not come in the shape of plugins. Have we improved modularity over time? I decided to take LoC count for plugins and storage engines &hellip; <a href=\"https:\/\/www.flamingspork.com\/blog\/2013\/03\/08\/mysql-modularity-are-we-there-yet\/\">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":[76,75,14],"tags":[70,340,628],"class_list":["post-3237","post","type-post","status-publish","format-standard","hentry","category-code","category-drizzle-work-et-al","category-mysql","tag-drizzle","tag-mariadb","tag-mysql"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5a6n8-Qd","jetpack-related-posts":[{"id":3257,"url":"https:\/\/www.flamingspork.com\/blog\/2013\/03\/13\/which-is-bigger-mysql-or-postgresql\/","url_meta":{"origin":3237,"position":0},"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":3254,"url":"https:\/\/www.flamingspork.com\/blog\/2013\/03\/12\/is-mysql-bigger-than-linux\/","url_meta":{"origin":3237,"position":1},"title":"Is MySQL bigger than Linux?","author":"Stewart Smith","date":"2013-03-12","format":false,"excerpt":"I'm going to take the numbers from my previous post, MySQL Modularity, Are We There Yet? for the \"kernel\" size of MySQL - that is, everything that isn't a plugin or storage engine. For Linux kernel, I'm just going to use the a-bit-old git tree I have on my laptop.\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":3345,"url":"https:\/\/www.flamingspork.com\/blog\/2013\/05\/23\/mysql-vs-drizzle-plugin-api\/","url_meta":{"origin":3237,"position":2},"title":"MySQL vs Drizzle plugin APIs","author":"Stewart Smith","date":"2013-05-23","format":false,"excerpt":"There's a big difference in how plugins are treated in MySQL and how they are treated in Drizzle. The MySQL way has been to create a C API in front of the C++-like (I call it C- as it manages to take the worst of both worlds) internal \"API\". The\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":1738,"url":"https:\/\/www.flamingspork.com\/blog\/2009\/10\/14\/return-of-the-top-5-mysql-wishlist-and-looking-at-drizzle\/","url_meta":{"origin":3237,"position":3},"title":"Return of the &#8220;Top 5 MySQL Wishlist&#8221; and looking at Drizzle","author":"Stewart Smith","date":"2009-10-14","format":false,"excerpt":"It's coming up on a year since I started working full time on Drizzle. So, I got a bit reflective... Have we done things that I (and others) really wanted done? Back in 2007, I wrote my top 5 wishlist for the MySQL Server. I am not going to pretend\u2026","rel":"","context":"In &quot;drizzle&quot;","block_context":{"text":"drizzle","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/drizzle-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1813,"url":"https:\/\/www.flamingspork.com\/blog\/2010\/03\/12\/writing-a-storage-engine-for-drizzle-part-2-create-table\/","url_meta":{"origin":3237,"position":4},"title":"Writing A Storage Engine for Drizzle, Part 2: CREATE TABLE","author":"Stewart Smith","date":"2010-03-12","format":false,"excerpt":"The DDL code paths for Drizzle are increasingly different from MySQL. For example, the embedded_innodb StorageEngine CREATE TABLE code path is completely different than what it would have to be for MySQL. This is because of a number of reasons, the primary one being that Drizzle uses a protobuf message\u2026","rel":"","context":"In &quot;drizzle&quot;","block_context":{"text":"drizzle","link":"https:\/\/www.flamingspork.com\/blog\/category\/work-et-al\/drizzle-work-et-al\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3291,"url":"https:\/\/www.flamingspork.com\/blog\/2013\/04\/18\/where-are-they-now-mysql-storage-engines\/","url_meta":{"origin":3237,"position":5},"title":"Where are they now: MySQL Storage Engines","author":"Stewart Smith","date":"2013-04-18","format":false,"excerpt":"There was once a big hooplah about the MySQL Storage Engine Architecture and how it was easy to just slot in some other method of storage instead of the provided ones. Over the years I've repeatedly mentioned how this wasn't really the case and that it was remarkably non trivial.\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\/3237","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=3237"}],"version-history":[{"count":3,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/3237\/revisions"}],"predecessor-version":[{"id":3249,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/3237\/revisions\/3249"}],"wp:attachment":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/media?parent=3237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/categories?post=3237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/tags?post=3237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}