rocksdb/include/rocksdb
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
..
c.h A few more C API functions. 2014-02-25 10:32:28 -08:00
cache.h Merge branch 'master' into performance 2014-01-28 10:35:55 -08:00
compaction_filter.h CompactionContext to include is_manual_compaction 2014-02-12 12:24:18 -08:00
comparator.h Add License message to public header files. 2013-11-18 10:21:35 -08:00
db.h Add ReadOptions to TransactionLogIterator. 2014-02-28 11:50:36 -08:00
env.h Optimize fallocation 2014-03-17 21:52:14 -07:00
filter_policy.h Add License message to public header files. 2013-11-18 10:21:35 -08:00
flush_block_policy.h Remove the terrible hack in for flush_block_policy_factory 2014-02-28 16:39:27 -08:00
iterator.h Add License message to public header files. 2013-11-18 10:21:35 -08:00
ldb_tool.h Add License message to public header files. 2013-11-18 10:21:35 -08:00
memtablerep.h Consolidate SliceTransform object ownership 2014-03-10 12:56:46 -07:00
merge_operator.h Introduce MergeContext to Lazily Initialize merge operand list 2013-12-11 11:37:28 -08:00
options.h Consolidate SliceTransform object ownership 2014-03-10 12:56:46 -07:00
perf_context.h output perf_context in db_bench readrandom 2014-03-05 10:32:54 -08:00
slice_transform.h Add License message to public header files. 2013-11-18 10:21:35 -08:00
slice.h Add License message to public header files. 2013-11-18 10:21:35 -08:00
statistics.h [RocksDB] make sure KSVObsolete does not get accessed as a valid pointer. 2014-03-10 12:55:25 -07:00
status.h IOError cleanup 2014-02-12 11:42:54 -08:00
table_properties.h Support prefix seek in UserCollectedProperties 2014-02-12 13:14:59 -08:00
table.h Make the block-based table's index pluggable 2014-02-28 18:19:07 -08:00
transaction_log.h Revert "Fix bad merge of D16791 and D16767" 2014-03-12 09:37:43 -07:00
types.h Add License message to public header files. 2013-11-18 10:21:35 -08:00
universal_compaction.h Moving Some includes from options.h to forward declaration 2014-01-24 17:16:22 -08:00
write_batch.h Fix the return type of WriteBatch::Data(). 2014-01-14 20:24:48 -08:00