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-01-30 22:10:10 -08:00
2014-01-06 11:11:19 -08:00
2014-01-02 16:43:35 -08:00
2014-02-12 11:42:54 -08:00
2013-10-23 14:38:52 -07:00
2013-11-16 11:21:34 +00:00
2014-03-14 10:22:37 -07:00
2014-01-14 22:03:57 -08:00
2014-03-17 21:52:14 -07:00
2014-03-14 23:56:58 +00:00
2014-03-17 21:52:14 -07:00
2014-03-03 21:11:49 -08:00
2014-01-17 12:46:06 -08:00
2014-01-17 12:46:06 -08:00
2014-02-08 14:15:51 -08:00
2014-03-10 11:05:44 -07:00
2014-02-12 11:42:54 -08:00
2013-12-03 12:42:15 -08:00
2014-01-17 12:46:06 -08:00