{"id":1928,"date":"2010-05-25T00:53:37","date_gmt":"2010-05-24T14:53:37","guid":{"rendered":"http:\/\/www.flamingspork.com\/blog\/?p=1928"},"modified":"2010-05-25T00:53:37","modified_gmt":"2010-05-24T14:53:37","slug":"nocache-ld_preload","status":"publish","type":"post","link":"https:\/\/www.flamingspork.com\/blog\/2010\/05\/25\/nocache-ld_preload\/","title":{"rendered":"nocache LD_PRELOAD"},"content":{"rendered":"<p>Want to do something like &#8220;cp big_file copy_of_big_file&#8221; or &#8220;tar xfz big_tarball.tar.gz&#8221; but without thrashing your cache?<\/p>\n<p><a href=\"http:\/\/www.enricozini.org\/\">Enrico Zini<\/a> has a nice little LD_PRELOAD called <a href=\"http:\/\/www.enricozini.org\/2010\/tips\/nocache\/\">nocache<\/a>.<\/p>\n<pre>$ nocache tar xfz foo.tar.gz<\/pre>\n<p>Goes well with <a href=\"http:\/\/launchpad.net\/libeatmydata\">libeatmydata<\/a>. A pair of tools for compensating for your Operating System casually hating you.<\/p>\n<p>I imagine people will love this when taking database backups.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Want to do something like &#8220;cp big_file copy_of_big_file&#8221; or &#8220;tar xfz big_tarball.tar.gz&#8221; but without thrashing your cache? Enrico Zini has a nice little LD_PRELOAD called nocache. $ nocache tar xfz foo.tar.gz Goes well with libeatmydata. A pair of tools for &hellip; <a href=\"https:\/\/www.flamingspork.com\/blog\/2010\/05\/25\/nocache-ld_preload\/\">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],"tags":[308,295,154,153,307],"class_list":["post-1928","post","type-post","status-publish","format-standard","hentry","category-general","tag-backups","tag-database","tag-ld_preload","tag-libeatmydata","tag-nocache"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p5a6n8-v6","jetpack-related-posts":[{"id":3083,"url":"https:\/\/www.flamingspork.com\/blog\/2012\/07\/03\/new-libeatmydata-release\/","url_meta":{"origin":1928,"position":0},"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":939,"url":"https:\/\/www.flamingspork.com\/blog\/2007\/11\/27\/libeatmydata\/","url_meta":{"origin":1928,"position":1},"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":1587,"url":"https:\/\/www.flamingspork.com\/blog\/2009\/04\/08\/using-dtrace-to-find-out-why-solaris-is-so-slow-and-if-its-actually-solaris\/","url_meta":{"origin":1928,"position":2},"title":"Using Dtrace to find out if the hardware or Solaris is slow (but really just working around the problem)","author":"Stewart Smith","date":"2009-04-08","format":false,"excerpt":"A little while ago, I was the brave soul tasked with making sure Drizzle was working properly and passing all tests on Solaris and OpenSolaris. Brian recently blogged about some of the advantages of also running on Solaris and the SunStudio compilers - more warnings from the compiler is a\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":2289,"url":"https:\/\/www.flamingspork.com\/blog\/2011\/02\/08\/timing-queries-in-the-21st-century-with-ld_preload-and-sed\/","url_meta":{"origin":1928,"position":3},"title":"Timing queries in the 21st century (with LD_PRELOAD and sed)","author":"Stewart Smith","date":"2011-02-08","format":false,"excerpt":"So... Baron blogged about wanting higher precision timers from the mysql binary and that running sed on the binary wasn't cutting it. However... I am not one to give up that easily! This is what LD_PRELOAD was made for! Evil nasty hacks to make your life easier! By looking at\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":1253,"url":"https:\/\/www.flamingspork.com\/blog\/2008\/11\/08\/libmallocfail\/","url_meta":{"origin":1928,"position":4},"title":"libmallocfail","author":"Stewart Smith","date":"2008-11-08","format":false,"excerpt":"Bazaar branches of libmallocfail Simple LD_PRELOAD library that will take parameters via environment variables and cause malloc() to occationally fail. Aim was to use this to test bits of MySQL\/Drizzle although since their libtool based stuf, the binary in tree is a libtool shell script, and I haven't found a\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":706,"url":"https:\/\/www.flamingspork.com\/blog\/2006\/05\/31\/davem-on-ingos-smp-lock-validator\/","url_meta":{"origin":1928,"position":5},"title":"DaveM on Ingo&#8217;s SMP lock validator","author":"Stewart Smith","date":"2006-05-31","format":false,"excerpt":"DaveM talks about Ingo's new SMP lock validator for linux kernel A note reminding me to go take a look and see what can be ripped out and placed into various bits of MySQL and NDB. Ideally, of course, it could be turned into a LD_PRELOAD for pthread mutexes. Anybody\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":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/1928","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=1928"}],"version-history":[{"count":2,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/1928\/revisions"}],"predecessor-version":[{"id":1930,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/posts\/1928\/revisions\/1930"}],"wp:attachment":[{"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/media?parent=1928"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/categories?post=1928"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flamingspork.com\/blog\/wp-json\/wp\/v2\/tags?post=1928"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}