Igor Canadi f26cb0f093 Optimize fallocation
Summary:
Based on my recent findings (posted in our internal group), if we use fallocate without KEEP_SIZE flag, we get superior performance of fdatasync() in append-only workloads.

This diff provides an option for user to not use KEEP_SIZE flag, thus optimizing his sync performance by up to 2x-3x.

At one point we also just called posix_fallocate instead of fallocate, which isn't very fast: http://code.woboq.org/userspace/glibc/sysdeps/posix/posix_fallocate.c.html (tl;dr it manually writes out zero bytes to allocate storage). This diff also fixes that, by first calling fallocate and then posix_fallocate if fallocate is not supported.

Test Plan: make check

Reviewers: dhruba, sdong, haobo, ljin

Reviewed By: dhruba

CC: leveldb

Differential Revision: https://reviews.facebook.net/D16761
2014-03-17 21:52:14 -07:00
..
2014-02-24 15:15:34 -08:00
2014-03-17 21:52:14 -07:00
2014-03-17 21:50:15 -07:00
2014-03-17 10:00:41 -07:00
2014-03-17 10:00:41 -07:00
2013-10-25 08:32:14 -07:00
2014-01-29 20:40:41 -08:00
2014-01-29 20:40:41 -08:00
2014-02-28 13:19:47 -08:00
2014-01-27 14:49:10 -08:00
2014-03-14 22:44:35 +00:00
2014-02-12 11:42:54 -08:00
2014-02-12 11:42:54 -08:00
2014-01-17 12:46:06 -08:00
2014-03-14 13:02:20 -07:00
2014-03-17 21:52:14 -07:00
2014-01-30 22:10:10 -08:00
2014-01-23 16:26:08 -08:00
2014-03-17 21:52:14 -07:00