libeatmydata is a small LD_PRELOAD library designed to (transparently) disable fsync (and friends, like open(O_SYNC)). This has two side-effects: making software that writes data safely to disk a lot quicker and making this software no longer crash safe.
DO NOT use libeatmydata on software where you care about what it stores. It's called libEAT-MY-DATA for a reason.
There's a Bazaar repository up at Launchpad and you can get it by simply: bzr branch lp:libeatmydata.
Download: The launchpad download page has all the latest libeatmydata downloads.
You can also download the source tarball from here: libeatmydata-105.tar.gz and GPG signature: libeatmydata-105.tar.gz.asc.
If installing from source, do the following:
bzr branch lp:libeatmydata (or extract from source tarball)cd libeatmydata./config/autorun.sh (if building from bzr only)./configuremakemake checksudo make installOnce libeatmydata is installed (either from a package or from source like above, simply run the eatmydata wrapper script:
eatmydata fooI use it primarily on Linux. Others have reported success on MacOS X, OpenSolaris, Solaris, Debian GNU/kFreeBSD. Patches welcome!
You can email me directly with patches. Development is hosted on launchpad.
Running mysql-test-run --do-test=innodb without/with libeatmydata:
TEST RESULT TIME (ms) TIME (with libeatmydata) ---------------------------------------------------------------------------------- main.innodb-lock [ pass ] 4523 4323 main.innodb-replace [ pass ] 102 56 main.innodb-ucs2 [ pass ] 5786 1084 main.innodb [ pass ] 78306 24900 main.innodb_gis [ pass ] 2647 1544 main.innodb_mysql [ pass ] 86810 68579 main.innodb_notembedded [ pass ] 198 150 main.innodb_timeout_rollback [ pass ] 2990 2750 main.innodb_trx_weight [ pass ] 1608 841 --------------------------------------------------------------- Stopping All Servers All 9 tests were successful. The servers were restarted 7 times WITHOUT: Spent 182.97 seconds actually executing testcases WITH : Spent 104.227 seconds actually executing testcases WITHOUT: WITH: real 3m36.053s real 2m10.610s user 0m42.323s user 0m41.939s sys 0m2.844s sys 0m2.356s
This saves us about a third of the total runtime!