diff options
author | Alex Gorrod <alexg@wiredtiger.com> | 2014-02-27 12:22:39 +1100 |
---|---|---|
committer | Alex Gorrod <alexg@wiredtiger.com> | 2014-02-27 12:22:39 +1100 |
commit | 25656615dcf39bc84264a766b2bf1ab8399d63e1 (patch) | |
tree | 587de10a9dcb1cf3598ef44c23cbb33757dfb401 | |
parent | fd1080ce3d87442220305b2c3b4f9ecba35fdeb5 (diff) | |
download | mongo-25656615dcf39bc84264a766b2bf1ab8399d63e1.tar.gz |
Don't automatically enable direct I/O on checkpoints.
Using direct I/O requires careful selection of page sizes, and doesn't
always improve performance. It's not worth enabling it automatically.
-rw-r--r-- | dist/api_data.py | 2 | ||||
-rw-r--r-- | src/config/config_def.c | 2 | ||||
-rw-r--r-- | src/include/wiredtiger.in | 2 | ||||
-rw-r--r-- | test/salvage/salvage.c | 7 |
4 files changed, 5 insertions, 8 deletions
diff --git a/dist/api_data.py b/dist/api_data.py index e74359425fb..2550c405520 100644 --- a/dist/api_data.py +++ b/dist/api_data.py @@ -609,7 +609,7 @@ methods = { Config('create', 'false', r''' create the database if it does not exist''', type='boolean'), - Config('direct_io', 'checkpoint', r''' + Config('direct_io', '', r''' Use \c O_DIRECT to access files. Options are given as a list, such as <code>"direct_io=[data]"</code>. Configuring \c direct_io requires care, see @ref diff --git a/src/config/config_def.c b/src/config/config_def.c index aba88402897..2c01cac1a85 100644 --- a/src/config/config_def.c +++ b/src/config/config_def.c @@ -428,7 +428,7 @@ static const WT_CONFIG_ENTRY config_entries[] = { { "wiredtiger_open", "buffer_alignment=-1,cache_size=100MB," "checkpoint=(name=\"WiredTigerCheckpoint\",wait=0)," - "checkpoint_sync=,create=0,direct_io=checkpoint,error_prefix=," + "checkpoint_sync=,create=0,direct_io=,error_prefix=," "eviction_dirty_target=80,eviction_target=80,eviction_trigger=95," "extensions=,file_extend=,hazard_max=1000,log=(archive=,enabled=0" ",file_max=100MB,path=\"\"),lsm_merge=,mmap=,multiprocess=0," diff --git a/src/include/wiredtiger.in b/src/include/wiredtiger.in index 0a890ce64ab..ec4825afade 100644 --- a/src/include/wiredtiger.in +++ b/src/include/wiredtiger.in @@ -1494,7 +1494,7 @@ struct __wt_connection { * list\, such as <code>"direct_io=[data]"</code>. Configuring \c direct_io * requires care\, see @ref tuning_system_buffer_cache_direct_io for important * warnings., a list\, with values chosen from the following options: \c - * "checkpoint"\, \c "data"\, \c "log"; default \c checkpoint.} + * "checkpoint"\, \c "data"\, \c "log"; default empty.} * @config{error_prefix, prefix string for error messages., a string; default * empty.} * @config{eviction_dirty_target, continue evicting until the cache has less diff --git a/test/salvage/salvage.c b/test/salvage/salvage.c index fcde7b335de..71c4944970f 100644 --- a/test/salvage/salvage.c +++ b/test/salvage/salvage.c @@ -606,17 +606,14 @@ process(void) const char *key, *value; WT_SESSION *session; char config[256]; - uint32_t config_offset; /* Salvage. */ - config_offset = 0; config[0] = '\0'; if (verbose) - config_offset += (uint32_t)snprintf(config, sizeof(config), + (void)snprintf(config, sizeof(config), "error_prefix=\"%s\",verbose=[salvage,verify],", progname); - snprintf(config + config_offset, sizeof(config) - config_offset, - "log=(enabled=false),buffer_alignment=%d", PSIZE); + strcat(config, "log=(enabled=false)"); assert(wiredtiger_open(NULL, NULL, config, &conn) == 0); assert(conn->open_session(conn, NULL, NULL, &session) == 0); |