From 4deb1751a650010ce9c15910a064be1348dec8ba Mon Sep 17 00:00:00 2001 From: Joe Thornber Date: Tue, 9 Jul 2013 16:52:31 +0100 Subject: [PATCH] stop using O_DIRECT until the cach does async io --- persistent-data/block.tcc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/persistent-data/block.tcc b/persistent-data/block.tcc index a103563..f392b5a 100644 --- a/persistent-data/block.tcc +++ b/persistent-data/block.tcc @@ -37,7 +37,9 @@ namespace { using namespace std; int const DEFAULT_MODE = 0666; - int const OPEN_FLAGS = O_DIRECT | O_SYNC; + + // FIXME: these will slow it down until we start doing asyn io. O_DIRECT | O_SYNC; + int const OPEN_FLAGS = 0; // FIXME: introduce a new exception for this, or at least lift this // to exception.h @@ -341,7 +343,7 @@ namespace persistent_data { unsigned max_concurrent_blocks, typename block_io::mode mode) : io_(new block_io(path, nr_blocks, mode)), - cache_(max(1024u, max_concurrent_blocks)), + cache_(max(64u, max_concurrent_blocks)), tracker_(0, nr_blocks) { }