{"id":4264,"date":"2017-11-27T09:00:18","date_gmt":"2017-11-26T23:00:18","guid":{"rendered":"https:\/\/www.flamingspork.com\/blog\/?p=4264"},"modified":"2017-02-07T15:06:55","modified_gmt":"2017-02-07T05:06:55","slug":"ten-years-of-libeatmydata","status":"publish","type":"post","link":"https:\/\/www.flamingspork.com\/blog\/2017\/11\/27\/ten-years-of-libeatmydata\/","title":{"rendered":"Ten years of libeatmydata!"},"content":{"rendered":"<p>So, <strong>ten<\/strong> years ago (how is that even <strong>possible<\/strong>&#8230; it seems like it was just a couple of years ago), there was the first commit in the <a href=\"https:\/\/github.com\/stewartsmith\/libeatmydata\">libeatmydata<\/a> repository (now in git on github rather than in bzr on launchpad). The first implementation was literally just this:<\/p>\n<blockquote>\n<pre>#include &lt;sys\/types.h&gt;\r\n#include \r\n#include \r\n#include &lt;sys\/stat.h&gt;\r\n#include \r\n\r\nint errno;\r\n\r\nint fsync(int fd)\r\n{\r\n       errno=0;\r\n       return 0;\r\n}\r\n<\/pre>\n<\/blockquote>\n<p>Soooo&#8230;. kind of incredibly simple. But, hey, it worked! Little did I know, that these two lines of code were going to grow into 166 lines of C in order to do it a bit more &#8220;properly&#8221;.<\/p>\n<p>My initial use case was making the MySQL test suite run faster: 30% faster back then! In fact, it was <strong>better<\/strong> than using tmpfs! It&#8217;s still used for that (even though I no longer hack on MySQL with any regularity), see <a href=\"https:\/\/github.com\/stewartsmith\/libeatmydata\/issues\/1\">github issue #1<\/a> for a recent bug that cropped up.<\/p>\n<p>Since then, I&#8217;m aware of eatmydata being used to build entire operating systems and in production in way too many places (on way too many machines). The probability that any given human who&#8217;s used a computer in the past 10 years has used libeatmydata, used a package built with it or used a service with it running somewhere in production is so close to 1 that I don&#8217;t want to think about it.<\/p>\n<p>Well&#8230; here&#8217;s to the <strong>next<\/strong> ten years of eating data!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So, ten years ago (how is that even possible&#8230; it seems like it was just a couple of years ago), there was the first commit in the libeatmydata repository (now in git on github rather than in bzr on launchpad). &hellip; <a href=\"https:\/\/www.flamingspork.com\/blog\/2017\/11\/27\/ten-years-of-libeatmydata\/\">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":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":[76],"tags":[713,310,153],"class_list":["post-4264","post","type-post","status-publish","format-standard","hentry","category-code","tag-anniversary","tag-eatmydata","tag-libeatmydata"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5a6n8-16M","jetpack-related-posts":[{"id":939,"url":"https:\/\/www.flamingspork.com\/blog\/2007\/11\/27\/libeatmydata\/","url_meta":{"origin":4264,"position":0},"title":"libeatmydata","author":"Stewart Smith","date":"2007-11-27","format":false,"excerpt":"Following my successful linux.conf.au talk \"Eat My Data: How Everybody Gets POSIX File I\/O Wrong\", I started to feel the need to easily be able to have my data eaten. Okay, not quite. However, when you've written your software properly, so it uses fsync() correctly, opening files with O_SYNC or\u2026","rel":"","context":"In &quot;life, the universe and everything&quot;","block_context":{"text":"life, the universe and everything","link":"https:\/\/www.flamingspork.com\/blog\/category\/life-the-universe-and-everything\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3894,"url":"https:\/\/www.flamingspork.com\/blog\/2014\/10\/30\/new-libeatmydata-release-105\/","url_meta":{"origin":4264,"position":1},"title":"New libeatmydata release: 105","author":"Stewart Smith","date":"2014-10-30","format":false,"excerpt":"Over on the project page and on launchpad you can now download libeatmydata 105. This release fixes a couple of bugs that came in via the Debian project, including a rather interesting one about some binaries not running .so ctors to properly init libeatmydata and the code path in 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":3083,"url":"https:\/\/www.flamingspork.com\/blog\/2012\/07\/03\/new-libeatmydata-release\/","url_meta":{"origin":4264,"position":2},"title":"New libeatmydata release!","author":"Stewart Smith","date":"2012-07-03","format":false,"excerpt":"I updated the web site for libeatmydata (woah!):\u00c2\u00a0http:\/\/flamingspork.com\/projects\/libeatmydata\/\u00c2\u00a0and the launchpad page: https:\/\/launchpad.net\/libeatmydata\u00c2\u00a0to reflect this too. New exciting things in the land of libeatmydata: sync_file_range is now wrapped (thanks to Phillip Susi) I now bundle the eatmydata helper script originally included in the debian packages the autotools foo builds on MacOS\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":3162,"url":"https:\/\/www.flamingspork.com\/blog\/2012\/09\/26\/new-libeatmydata-release-65-macos-x-10-7-fixes\/","url_meta":{"origin":4264,"position":3},"title":"New libeatmydata release (65): MacOS X 10.7 fixes","author":"Stewart Smith","date":"2012-09-26","format":false,"excerpt":"This release incorporates contributions from\u00c2\u00a0Blair Zajac to fix issues on MacOS X 10.7. You can get the source tarball over on the launchpad page for the release\u00c2\u00a0or directly from my web site: source:\u00c2\u00a0libeatmydata-65.tar.gz signature:\u00c2\u00a0libeatmydata-65.tar.gz.asc SHA1:\u00c2\u00a01e53fc809020de7f166fa7232456d12f1485e9d4","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":4795,"url":"https:\/\/www.flamingspork.com\/blog\/2021\/04\/11\/libeatmydata-v129\/","url_meta":{"origin":4264,"position":4},"title":"libeatmydata v129","author":"Stewart Smith","date":"2021-04-11","format":false,"excerpt":"Every so often, I release a new libeatmydata. This has not happened for a long time. This is just some bug fixes, most of which have been in the Debian package for some time, I've just been lazy and not sat down and merged them. git clone https:\/\/github.com\/stewartsmith\/libeatmydata.git Download the\u2026","rel":"","context":"In &quot;General&quot;","block_context":{"text":"General","link":"https:\/\/www.flamingspork.com\/blog\/category\/general\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3335,"url":"https:\/\/www.flamingspork.com\/blog\/2013\/05\/18\/new-libeatmydata-release-2\/","url_meta":{"origin":4264,"position":5},"title":"New libeatmydata release","author":"Stewart Smith","date":"2013-05-18","format":false,"excerpt":"Good news everyone! There's a new libeatmydata release! I've put a source tarball up on the launchpad page: release-79. This version packs: RPM and debian packaging in tree A bug fix so that O_SYNC and O_DSYNC are properly discarded on 32bit machines both with and without _FILE_OFFSET_BITS being set. I'd\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\/4264","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=4264"}],"version-history":[{"count":1,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/4264\/revisions"}],"predecessor-version":[{"id":4265,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/4264\/revisions\/4265"}],"wp:attachment":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/media?parent=4264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/categories?post=4264"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/tags?post=4264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}