summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gorrod <alexg@wiredtiger.com>2012-11-09 14:17:50 +1100
committerAlex Gorrod <alexg@wiredtiger.com>2012-11-09 14:17:50 +1100
commit69b3266fca3906704cf3aca1797887480b99d9d7 (patch)
tree78ec0f2df4b2d00177ca39e794b2d0a1d5b1509b
parent687e85c64768709b8f00f3383701e1dd64db5937 (diff)
downloadmongo-69b3266fca3906704cf3aca1797887480b99d9d7.tar.gz
Update shared_cache configuration settings and related changes.
Update documentation and some other tidbits.
-rw-r--r--dist/api_data.py40
-rw-r--r--dist/config.py343
-rw-r--r--dist/s_define.list1
-rw-r--r--dist/t.out1
-rw-r--r--examples/c/ex_config.c2
-rw-r--r--examples/c/ex_test_perf.c8
-rw-r--r--src/btree/bt_cache.c2
-rw-r--r--src/config/config_def.c346
-rw-r--r--src/conn/conn_api.c2
-rw-r--r--src/conn/conn_cache_pool.c62
-rw-r--r--src/docs/cache-configuration.dox21
-rw-r--r--src/include/api.h24
-rw-r--r--src/include/extern.h2
-rw-r--r--src/include/wiredtiger.in119
-rw-r--r--test/bloom/test_bloom.c2
-rw-r--r--test/fops/t.c2
-rw-r--r--test/format/wts.c2
-rw-r--r--test/suite/test_config01.py2
-rw-r--r--test/suite/test_config03.py1
-rw-r--r--test/suite/test_config04.py10
-rw-r--r--test/suite/test_cursor03.py2
-rw-r--r--test/suite/test_schema03.py2
-rw-r--r--test/suite/test_shared_cache.py (renamed from test/suite/test_cache_pool.py)44
-rw-r--r--test/thread/t.c2
24 files changed, 507 insertions, 535 deletions
diff --git a/dist/api_data.py b/dist/api_data.py
index a9de4c4a466..a56db79e5d5 100644
--- a/dist/api_data.py
+++ b/dist/api_data.py
@@ -232,20 +232,28 @@ table_meta = format_meta + table_only_meta
# Connection runtime config, shared by conn.reconfigure and wiredtiger_open
connection_runtime_config = [
- Config('cache', '', r'''
- cache configuration setup''', type='category', subconfig=[
- Config('size', '100MB', r'''
- maximum heap memory to allocate for the cache''',
+ Config('shared_cache', '', r'''
+ shared cache configuration options. A database should configure either
+ a cache_size or a shared_cache not both''',
+ type='category', subconfig=[
+ Config('chunk', '5', r'''
+ the granularity that a shared cache is redistributed as a
+ percentage''',
+ min='1', max='100'),
+ Config('min', '10', r'''
+ minimum amount of cache a database in a shared cache can have
+ as a percentage''',
+ min='1', max='100'),
+ Config('name', '', r'''
+ name of a cache that is shared between databases'''),
+ Config('size', '500MB', r'''
+ maximum memory to allocate for the shared cache''',
+ min='1MB', max='10TB')
+ ]),
+ Config('cache_size', '100MB', r'''
+ maximum heap memory to allocate for the cache. A database should
+ configure either a cache_size or a shared_cache not both''',
min='1MB', max='10TB'),
- Config('pool', '', r'''
- name of a cache pool that is shared between databases'''),
- Config('pool_min', '', r'''
- minimum amount of cache a connection in a cache pool can have''',
- min='1MB', max='10TB'),
- Config('pool_chunk', '', r'''
- the granularity that a cache pool is shared out. Only valid if the
- cache_pool option is also specified''',
- min='1MB', max='10TB')]),
Config('error_prefix', '', r'''
prefix string for error messages'''),
Config('eviction_target', '80', r'''
@@ -261,7 +269,7 @@ connection_runtime_config = [
list, such as <code>"verbose=[evictserver,read]"</code>''',
type='list', choices=[
'block',
- 'cache_pool',
+ 'shared_cache',
'ckpt',
'evict',
'evictserver',
@@ -522,13 +530,13 @@ flags = {
###################################################
# Internal routine flag declarations
###################################################
- 'cache_pool' : [ 'CACHE_POOL_RUN' ],
+ 'shared_cache' : [ 'CACHE_POOL_RUN' ],
'direct_io' : [ 'DIRECTIO_DATA', 'DIRECTIO_LOG' ],
'page_free' : [ 'PAGE_FREE_IGNORE_DISK' ],
'rec_evict' : [ 'REC_SINGLE' ],
'verbose' : [
'VERB_block',
- 'VERB_cache_pool',
+ 'VERB_shared_cache',
'VERB_ckpt',
'VERB_evict',
'VERB_evictserver',
diff --git a/dist/config.py b/dist/config.py
index 4e86ee19f25..6a8adcf92c6 100644
--- a/dist/config.py
+++ b/dist/config.py
@@ -16,113 +16,130 @@ tfile = open(tmp_file, 'w')
cbegin_re = re.compile(r'(\s*\*\s*)@config(?:empty|start)\{(.*?),.*\}')
def gettype(c):
- '''Derive the type of a config item'''
- checks = c.flags
- ctype = checks.get('type', None)
- if not ctype and ('min' in checks or 'max' in checks):
- ctype = 'int'
- return ctype or 'string'
+ '''Derive the type of a config item'''
+ checks = c.flags
+ ctype = checks.get('type', None)
+ if not ctype and ('min' in checks or 'max' in checks):
+ ctype = 'int'
+ return ctype or 'string'
def typedesc(c):
- '''Descripe what type of value is expected for the given config item'''
- checks = c.flags
- cmin = str(checks.get('min', ''))
- cmax = str(checks.get('max', ''))
- choices = checks.get('choices', [])
- ctype = gettype(c)
- desc = {
- 'boolean' : 'a boolean flag',
- 'format' : 'a format string',
- 'int' : 'an integer',
- 'list' : 'a list',
- 'category': 'a set of related configuration options defined below',
- 'string' : 'a string'}[ctype]
- if cmin and cmax:
- desc += ' between ' + cmin + ' and ' + cmax
- elif cmin:
- desc += ' greater than or equal to ' + cmin
- elif cmax:
- desc += ' no more than ' + cmax
- if choices:
- if ctype == 'list':
- desc += ', with values chosen from the following options: '
- else:
- desc += ', chosen from the following options: '
- desc += ', '.join('\\c "' + c + '"' for c in choices)
- elif ctype == 'list':
- desc += ' of strings'
- return desc
-
-def parseconfig(c, parent_name=None):
- ctype = gettype(c)
- desc = textwrap.dedent(c.desc) + '.'
- desc = desc.replace(',', '\\,')
- default = '\\c ' + str(c.default) if c.default or ctype == 'int' \
- else 'empty'
- name = c.name
- if parent_name:
- name = parent_name + '.' + name
-
- tdesc = typedesc(c)
- if ctype != 'category':
- tdesc += '; default ' + default
- tdesc += '.'
- tdesc = tdesc.replace(',', '\\,')
- output = '@config{' + ','.join((name, desc, tdesc)) + '}'
- if ctype == 'category':
- for subc in c.subconfig:
- output += parseconfig(subc, c.name)
- return output
+ '''Descripe what type of value is expected for the given config item'''
+ checks = c.flags
+ cmin = str(checks.get('min', ''))
+ cmax = str(checks.get('max', ''))
+ choices = checks.get('choices', [])
+ ctype = gettype(c)
+ desc = {
+ 'boolean' : 'a boolean flag',
+ 'format' : 'a format string',
+ 'int' : 'an integer',
+ 'list' : 'a list',
+ 'category': 'a set of related configuration options defined below',
+ 'string' : 'a string'}[ctype]
+ if cmin and cmax:
+ desc += ' between ' + cmin + ' and ' + cmax
+ elif cmin:
+ desc += ' greater than or equal to ' + cmin
+ elif cmax:
+ desc += ' no more than ' + cmax
+ if choices:
+ if ctype == 'list':
+ desc += ', with values chosen from the following options: '
+ else:
+ desc += ', chosen from the following options: '
+ desc += ', '.join('\\c "' + c + '"' for c in choices)
+ elif ctype == 'list':
+ desc += ' of strings'
+ return desc
+
+def parseconfig(c, name_indent=''):
+ ctype = gettype(c)
+ desc = textwrap.dedent(c.desc) + '.'
+ desc = desc.replace(',', '\\,')
+ default = '\\c ' + str(c.default) if c.default or ctype == 'int' \
+ else 'empty'
+ name = name_indent + c.name
+
+ tdesc = typedesc(c)
+ if ctype != 'category':
+ tdesc += '; default ' + default
+ else:
+ name += ' = ('
+ tdesc += '.'
+ tdesc = tdesc.replace(',', '\\,')
+ output = '@config{' + ','.join((name, desc, tdesc)) + '}'
+ if ctype == 'category':
+ for subc in c.subconfig:
+ output += parseconfig(subc, name_indent + ('&nbsp;' * 4))
+ output += '@config{ ),,}'
+ return output
+
+def getconfcheck(c):
+ check = '{ "' + c.name + '", "' + gettype(c) + '", '
+ cstr = checkstr(c)
+ sstr = getsubconfigstr(c)
+ if cstr != 'NULL':
+ cstr = '"\n\t "'.join(w.wrap(cstr))
+ # Manually re-wrap when there is a check string to avoid ugliness
+ # between string and non-string wrapping
+ if len(check + cstr + ',\n\t ' + sstr + '},') >= 68:
+ check = check + '\n\t ' + cstr + ',\n\t ' + sstr + '},'
+ else:
+ check = check + cstr + ', ' + sstr + '},'
+ else:
+ check = '\n\t '.join(w.wrap(check + cstr + ', ' + sstr + '},'))
+ return check
skip = False
for line in open(f, 'r'):
- if skip:
- if '@configend' in line:
- skip = False
- continue
-
- m = cbegin_re.match(line)
- if not m:
- tfile.write(line)
- continue
-
- prefix, config_name = m.groups()
- if config_name not in api_data.methods:
- print >>sys.stderr, "Missing configuration for " + config_name
- tfile.write(line)
- continue
-
- skip = ('@configstart' in line)
-
- if not api_data.methods[config_name].config:
- tfile.write(prefix + '@configempty{' + config_name +
- ', see dist/api_data.py}\n')
- continue
-
- tfile.write(prefix + '@configstart{' + config_name +
- ', see dist/api_data.py}\n')
-
- w = textwrap.TextWrapper(width=80-len(prefix.expandtabs()),
- break_on_hyphens=False)
- lastname = None
- for c in sorted(api_data.methods[config_name].config):
- name = c.name
- if '.' in name:
- print >>sys.stderr, "Bad config key " + name
-
- # Deal with duplicates: with complex configurations (like
- # WT_SESSION::create), it's simpler to deal with duplicates here than
- # manually in api_data.py.
- if name == lastname:
- continue
- lastname = name
- if 'undoc' in c.flags:
- continue
- output = parseconfig(c)
- for l in w.wrap(output):
- tfile.write(prefix + l + '\n')
-
- tfile.write(prefix + '@configend\n')
+ if skip:
+ if '@configend' in line:
+ skip = False
+ continue
+
+ m = cbegin_re.match(line)
+ if not m:
+ tfile.write(line)
+ continue
+
+ prefix, config_name = m.groups()
+ if config_name not in api_data.methods:
+ print >>sys.stderr, "Missing configuration for " + config_name
+ tfile.write(line)
+ continue
+
+ skip = ('@configstart' in line)
+
+ if not api_data.methods[config_name].config:
+ tfile.write(prefix + '@configempty{' + config_name +
+ ', see dist/api_data.py}\n')
+ continue
+
+ tfile.write(prefix + '@configstart{' + config_name +
+ ', see dist/api_data.py}\n')
+
+ w = textwrap.TextWrapper(width=80-len(prefix.expandtabs()),
+ break_on_hyphens=False)
+ lastname = None
+ for c in sorted(api_data.methods[config_name].config):
+ name = c.name
+ if '.' in name:
+ print >>sys.stderr, "Bad config key " + name
+
+ # Deal with duplicates: with complex configurations (like
+ # WT_SESSION::create), it's simpler to deal with duplicates here than
+ # manually in api_data.py.
+ if name == lastname:
+ continue
+ lastname = name
+ if 'undoc' in c.flags:
+ continue
+ output = parseconfig(c)
+ for l in w.wrap(output):
+ tfile.write(prefix + l + '\n')
+
+ tfile.write(prefix + '@configend\n')
tfile.close()
compare_srcfile(tmp_file, f)
@@ -139,106 +156,104 @@ tfile.write('''/* DO NOT EDIT: automatically built by dist/config.py. */
''')
# Make a TextWrapper that can wrap at commas.
-# Choose 66 because there are up to 14 characters of indent and escape chars
-w = textwrap.TextWrapper(width=66, break_on_hyphens=False)
+w = textwrap.TextWrapper(width=68, break_on_hyphens=False)
w.wordsep_re = w.wordsep_simple_re = re.compile(r'(,)')
def checkstr(c):
- '''Generate the JSON string used by __wt_config_check to validate the
- config string'''
- checks = c.flags
- cmin = str(checks.get('min', ''))
- cmax = str(checks.get('max', ''))
- choices = checks.get('choices', [])
- subconfig = checks.get('subconfig', [])
- result = []
- if cmin:
- result.append('min=' + cmin)
- if cmax:
- result.append('max=' + cmax)
- if subconfig:
- result.append('subconfig=' + '[' +
- ','.join('\\"' + parseconfig(c) + '\\"' for c in subconfig) + ']')
- if choices:
- result.append('choices=' + '[' +
- ','.join('\\"' + s + '\\"' for s in choices) + ']')
- if result:
- return '"' + ','.join(result) + '"'
- else:
- return 'NULL'
+ '''Generate the JSON string used by __wt_config_check to validate the
+ config string'''
+ checks = c.flags
+ cmin = str(checks.get('min', ''))
+ cmax = str(checks.get('max', ''))
+ choices = checks.get('choices', [])
+ subconfig = checks.get('subconfig', [])
+ result = []
+ if cmin:
+ result.append('min=' + cmin)
+ if cmax:
+ result.append('max=' + cmax)
+ if subconfig:
+ result.append('subconfig=' + '[' +
+ ','.join('\\"' + parseconfig(c) + '\\"' for c in subconfig) + ']')
+ if choices:
+ result.append('choices=' + '[' +
+ ','.join('\\"' + s + '\\"' for s in choices) + ']')
+ if result:
+ return '"' + ','.join(result) + '"'
+ else:
+ return 'NULL'
def get_default(c):
- t = gettype(c)
- if c.default == 'false':
- return '0'
- elif t == 'category':
- return '(%s)' % (','.join('%s=%s' % (subc.name, get_default(subc))
- for subc in sorted(c.subconfig)))
- elif (c.default or t == 'int') and c.default != 'true':
- return str(c.default)
- else:
- return ''
+ t = gettype(c)
+ if c.default == 'false':
+ return '0'
+ elif t == 'category':
+ return '(%s)' % (','.join('%s=%s' % (subc.name, get_default(subc))
+ for subc in sorted(c.subconfig)))
+ elif (c.default or t == 'int') and c.default != 'true':
+ return str(c.default)
+ else:
+ return ''
created_subconfigs=set()
def add_subconfig(c):
- if c.name in created_subconfigs:
- return
- created_subconfigs.add(c.name)
- tfile.write('''
+ if c.name in created_subconfigs:
+ return
+ created_subconfigs.add(c.name)
+ tfile.write('''
WT_CONFIG_CHECK
__wt_confchk_%(name)s_subconfigs[] = {
\t%(check)s
\t{ NULL, NULL, NULL, NULL }
};
''' % {
- 'name' : c.name,
- 'check' : '\n\t'.join('"\n\t "'.join(w.wrap('{ "%s", "%s", %s, NULL },' %
- (subc.name, gettype(subc), checkstr(subc)))) for subc in sorted(c.subconfig)),
+ 'name' : c.name,
+ 'check' : '\n\t'.join('"\n\t "'.join(w.wrap('{ "%s", "%s", %s, NULL },' %
+ (subc.name, gettype(subc), checkstr(subc)))) for subc in sorted(c.subconfig)),
})
def getsubconfigstr(c):
- '''Return a string indicating if an item has sub configuration'''
- ctype = gettype(c)
- if ctype == 'category':
- add_subconfig(c)
- return '__wt_confchk_' + c.name + '_subconfigs'
- else:
- return 'NULL'
+ '''Return a string indicating if an item has sub configuration'''
+ ctype = gettype(c)
+ if ctype == 'category':
+ add_subconfig(c)
+ return '__wt_confchk_' + c.name + '_subconfigs'
+ else:
+ return 'NULL'
for name in sorted(api_data.methods.keys()):
- ctype = api_data.methods[name].config
- name = name.replace('.', '_')
- tfile.write('''
+ ctype = api_data.methods[name].config
+ name = name.replace('.', '_')
+ tfile.write('''
const char *
__wt_confdfl_%(name)s =
%(config)s;
''' % {
- 'name' : name,
- 'config' : '\n'.join('\t"%s"' % line
- for line in w.wrap(','.join('%s=%s' % (c.name, get_default(c))
- for c in sorted(ctype))) or [""]),
+ 'name' : name,
+ 'config' : '\n'.join('\t"%s"' % line
+ for line in w.wrap(','.join('%s=%s' % (c.name, get_default(c))
+ for c in sorted(ctype))) or [""]),
})
# Construct an array of allowable configuration options. Always append an empty
# string as a terminator for iteration
- if not ctype:
- tfile.write('''
+ if not ctype:
+ tfile.write('''
WT_CONFIG_CHECK
__wt_confchk_%(name)s[] = {
\t{ NULL, NULL, NULL, NULL }
};
''' % { 'name' : name })
- else:
- tfile.write('''
+ else:
+ tfile.write('''
WT_CONFIG_CHECK
__wt_confchk_%(name)s[] = {
\t%(check)s
\t{ NULL, NULL, NULL, NULL }
};
''' % {
- 'name' : name,
- 'check' : '\n\t'.join('"\n\t "'.join(w.wrap('{ "%s", "%s", %s, %s },' %
- (c.name, gettype(c), checkstr(c), getsubconfigstr(c)))) for c in sorted(ctype)),
+ 'name' : name,
+ 'check' : '\n\t'.join(getconfcheck(c) for c in sorted(ctype)),
})
tfile.close()
diff --git a/dist/s_define.list b/dist/s_define.list
index f2eff521839..c110992c359 100644
--- a/dist/s_define.list
+++ b/dist/s_define.list
@@ -19,6 +19,7 @@ WT_BLOCK_DESC_SIZE
WT_DEBUG_BYTE
WT_READ_BARRIER
WT_STAT
+WT_STAT_CHECK_SESSION
WT_STAT_DECRV
WT_STAT_INCRV
__F
diff --git a/dist/t.out b/dist/t.out
deleted file mode 100644
index 461657575af..00000000000
--- a/dist/t.out
+++ /dev/null
@@ -1 +0,0 @@
-WT_CURDUMP_PASS __api_err_printf __backup_all __backup_file_create __backup_file_remove __backup_list_append __backup_start __backup_stop __backup_table __backup_table_element __backup_uri __bit_alloc __bit_clear __bit_ffc __bit_ffs __bit_getv __bit_getv_recno __bit_nclr __bit_nset __bit_set __bit_setv __bit_setv_recno __bit_test __block_buffer_to_addr __block_ext_insert __block_ext_overlap __block_extlist_last __block_merge __block_off_insert __block_off_match __block_off_remove __block_off_srch __block_off_srch_pair __block_size_srch __bloom_init __bloom_setup __bm_invalid __btree_conf __btree_get_last_recno __btree_page_sizes __btree_tree_open_empty __bulk_row_keycmp_err __cache_pool_balance __cache_read_row_deleted __ckpt_compare_order __ckpt_extlist_fblocks __ckpt_extlist_read __ckpt_last_addr __ckpt_last_name __ckpt_name_ok __ckpt_named_addr __ckpt_process __ckpt_set __ckpt_string __ckpt_update __ckpt_version_chk __clsm_close __clsm_close_cursors __clsm_compare __clsm_deleted __clsm_enter __clsm_get_current __clsm_insert __clsm_next __clsm_open_cursors __clsm_prev __clsm_put __clsm_remove __clsm_reset __clsm_search __clsm_search_near __clsm_update __col_insert_alloc __col_insert_search __col_insert_search_match __col_last_recno __col_var_search __config_err __config_next __config_process_value __conn_add_collator __conn_add_compressor __conn_add_data_source __conn_add_extractor __conn_btree_get __conn_btree_open __conn_btree_open_lock __conn_close __conn_config_env __conn_config_file __conn_get_home __conn_home __conn_is_new __conn_load_extension __conn_open_session __conn_reconfigure __conn_remove_collator __conn_remove_compressor __conn_remove_data_source __conn_single __conn_verbose_config __create_colgroup __create_file __create_index __create_table __curbackup_close __curbackup_next __curbackup_reset __curbulk_close __curbulk_insert __curconfig_close __curdump_close __curdump_get_key __curdump_get_value __curdump_search_near __curdump_set_key __curdump_set_value __curfile_close __curfile_compare __curfile_insert __curfile_next __curfile_next_random __curfile_prev __curfile_remove __curfile_reset __curfile_search __curfile_search_near __curfile_update __curindex_close __curindex_get_value __curindex_move __curindex_next __curindex_open_colgroups __curindex_prev __curindex_reset __curindex_search __curindex_search_near __curindex_set_value __cursor_enter __cursor_equals __cursor_fix_append_next __cursor_fix_append_prev __cursor_fix_implicit __cursor_fix_next __cursor_fix_prev __cursor_func_init __cursor_func_resolve __cursor_invalid __cursor_leave __cursor_position_clear __cursor_row_next __cursor_row_prev __cursor_row_slot_return __cursor_runtime_config __cursor_search __cursor_search_clear __cursor_set_recno __cursor_size_chk __cursor_skip_prev __cursor_truncate __cursor_truncate_fix __cursor_var_append_next __cursor_var_append_prev __cursor_var_next __cursor_var_prev __curstat_close __curstat_conn_init __curstat_file_init __curstat_get_key __curstat_get_value __curstat_lsm_init __curstat_next __curstat_prev __curstat_print_value __curstat_reset __curstat_search __curstat_set_key __curstat_set_value __curtable_close __curtable_compare __curtable_insert __curtable_next __curtable_next_random __curtable_open_colgroups __curtable_open_indices __curtable_prev __curtable_remove __curtable_reset __curtable_search __curtable_search_near __curtable_update __debug_cell __debug_cell_data __debug_col_skip __debug_config __debug_dsk_cell __debug_dsk_col_fix __debug_hex_byte __debug_ikey __debug_item __debug_page __debug_page_col_fix __debug_page_col_int __debug_page_col_var __debug_page_hdr __debug_page_modify __debug_page_row_int __debug_page_row_leaf __debug_ref __debug_row_skip __debug_tree __debug_update __desc_read __dmsg __dmsg_wrapup __drop __drop_colgroup __drop_file __drop_from __drop_index __drop_table __drop_to __dump_to_raw __err_cell_corrupted __err_cell_type __err_eof __eventv __evict_clear_tree_walk __evict_file_request __evict_file_request_walk __evict_get_page __evict_list_clr __evict_list_clr_all __evict_lru __evict_lru_cmp __evict_page __evict_walk __evict_walk_file __evict_worker __find_column_format __find_next_col __free_page_col_int __free_page_col_var __free_page_modify __free_page_row_int __free_page_row_leaf __free_skip_array __free_skip_list __free_update __free_update_list __handle_error_default __handle_error_verbose __handle_message_default __handle_message_verbose __handle_progress_default __handle_progress_verbose __handler_failure __hazard_dump __hazard_exclusive __hex_fmterr __inmem_col_fix __inmem_col_int __inmem_col_var __inmem_row_int __inmem_row_leaf __inmem_row_leaf_slots __log_record_size __lsm_bloom_create __lsm_create __lsm_drop __lsm_free_chunks __lsm_open_cursor __lsm_rename __lsm_tree_close __lsm_tree_discard __lsm_tree_open __lsm_tree_open_check __lsm_tree_start_worker __lsm_truncate __meta_track_apply __meta_track_next __metadata_turtle __open_directory_sync __open_index __ovfl_cache_col_visible __ovfl_cache_row_visible __ovfl_read __pack_init __pack_initn __pack_next __pack_size __pack_write __raw_to_dump __rec_bulk_insert_split_check __rec_cell_build_addr __rec_cell_build_key __rec_cell_build_ovfl __rec_cell_build_val __rec_col_fix __rec_col_fix_slvg __rec_col_int __rec_col_merge __rec_col_var __rec_col_var_helper __rec_copy_incr __rec_dict_replace __rec_dictionary_free __rec_dictionary_init __rec_dictionary_lookup __rec_dictionary_reset __rec_dictionary_skip_insert __rec_dictionary_skip_search __rec_dictionary_skip_search_stack __rec_discard_page __rec_discard_tree __rec_excl_clear __rec_incr __rec_key_state_update __rec_page_clean_update __rec_page_deleted __rec_page_dirty_update __rec_page_modified __rec_review __rec_root_update __rec_row_int __rec_row_leaf __rec_row_leaf_insert __rec_row_merge __rec_split __rec_split_bnd_grow __rec_split_col __rec_split_discard __rec_split_finish __rec_split_fixup __rec_split_init __rec_split_row __rec_split_row_promote __rec_split_write __rec_track_extend __rec_txn_read __rec_write_init __rec_write_wrapup __rec_write_wrapup_err __rename_file __rename_table __rename_tree __schema_add_table __schema_find_table __session_begin_transaction __session_checkpoint __session_close __session_close_cache __session_commit_transaction __session_compact __session_compact_worker __session_create __session_drop __session_msg_printf __session_open_cursor __session_reconfigure __session_rename __session_reset_cursors __session_rollback_transaction __session_salvage __session_truncate __session_upgrade __session_verify __slvg_cleanup __slvg_col_build_internal __slvg_col_build_leaf __slvg_col_merge_ovfl __slvg_col_range __slvg_col_range_missing __slvg_col_range_overlap __slvg_col_trk_update_start __slvg_merge_block_free __slvg_modify_init __slvg_ovfl_compare __slvg_ovfl_discard __slvg_ovfl_reconcile __slvg_read __slvg_row_build_internal __slvg_row_build_leaf __slvg_row_merge_ovfl __slvg_row_range __slvg_row_range_overlap __slvg_row_trk_update_start __slvg_trk_compare_addr __slvg_trk_compare_gen __slvg_trk_compare_key __slvg_trk_free __slvg_trk_init __slvg_trk_leaf __slvg_trk_leaf_ovfl __slvg_trk_ovfl __stat_page __stat_page_col_var __stat_page_row_leaf __track_dump __track_msg __tree_walk_delete __tree_walk_read __truncate_file __truncate_table __txn_sort_snapshot __unpack_read __val_ovfl_cache_col __val_ovfl_cache_row __verify_checkpoint_reset __verify_ckptfrag_add __verify_ckptfrag_chk __verify_config __verify_dsk_chunk __verify_dsk_col_fix __verify_dsk_col_int __verify_dsk_col_var __verify_dsk_row __verify_filefrag_add __verify_filefrag_chk __verify_overflow __verify_overflow_cell __verify_row_int_key_order __verify_row_leaf_key_order __verify_start_avail __verify_tree __wt_abort __wt_addr_string __wt_assert __wt_attach __wt_bad_object_type __wt_block_addr_string __wt_block_addr_to_buffer __wt_block_addr_valid __wt_block_alloc __wt_block_buffer_to_addr __wt_block_buffer_to_ckpt __wt_block_checkpoint __wt_block_checkpoint_load __wt_block_checkpoint_resolve __wt_block_checkpoint_unload __wt_block_ckpt_destroy __wt_block_ckpt_init __wt_block_ckpt_to_buffer __wt_block_close __wt_block_compact_page_skip __wt_block_compact_skip __wt_block_create __wt_block_extend __wt_block_extlist_check __wt_block_extlist_dump __wt_block_extlist_free __wt_block_extlist_init __wt_block_extlist_merge __wt_block_extlist_overlap __wt_block_extlist_read __wt_block_extlist_read_avail __wt_block_extlist_truncate __wt_block_extlist_write __wt_block_free __wt_block_header __wt_block_insert_ext __wt_block_misplaced __wt_block_off_free __wt_block_off_remove_overlap __wt_block_open __wt_block_read __wt_block_read_off __wt_block_salvage_end __wt_block_salvage_next __wt_block_salvage_start __wt_block_stat __wt_block_truncate __wt_block_verify __wt_block_verify_addr __wt_block_verify_end __wt_block_verify_start __wt_block_write __wt_block_write_off __wt_block_write_size __wt_bloom_close __wt_bloom_create __wt_bloom_drop __wt_bloom_finalize __wt_bloom_get __wt_bloom_insert __wt_bloom_open __wt_bm_addr_stderr __wt_bm_addr_string __wt_bm_addr_valid __wt_bm_checkpoint __wt_bm_checkpoint_load __wt_bm_checkpoint_resolve __wt_bm_checkpoint_unload __wt_bm_close __wt_bm_compact_page_skip __wt_bm_compact_skip __wt_bm_create __wt_bm_free __wt_bm_open __wt_bm_read __wt_bm_salvage_end __wt_bm_salvage_next __wt_bm_salvage_start __wt_bm_stat __wt_bm_truncate __wt_bm_verify_addr __wt_bm_verify_end __wt_bm_verify_start __wt_bm_write __wt_bm_write_size __wt_breakpoint __wt_bt_cache_flush __wt_bt_cache_force_write __wt_bt_salvage __wt_btcur_close __wt_btcur_compare __wt_btcur_insert __wt_btcur_iterate_setup __wt_btcur_next __wt_btcur_next_random __wt_btcur_prev __wt_btcur_remove __wt_btcur_reset __wt_btcur_search __wt_btcur_search_near __wt_btcur_truncate __wt_btcur_update __wt_btree_close __wt_btree_create __wt_btree_get_memsize __wt_btree_huffman_close __wt_btree_huffman_open __wt_btree_leaf_create __wt_btree_lex_compare __wt_btree_open __wt_btree_release_memsize __wt_btree_stat_init __wt_btree_tree_open __wt_btree_truncate __wt_buf_catfmt __wt_buf_clear __wt_buf_fmt __wt_buf_free __wt_buf_grow __wt_buf_init __wt_buf_initsize __wt_buf_set __wt_buf_set_printable __wt_buf_steal __wt_bulk_end __wt_bulk_init __wt_bulk_insert __wt_bytelock __wt_cache_bytes_inuse __wt_cache_config __wt_cache_create __wt_cache_destroy __wt_cache_evict_server __wt_cache_full_check __wt_cache_page_evict __wt_cache_page_inmem_decr __wt_cache_page_inmem_incr __wt_cache_page_read __wt_cache_pages_inuse __wt_cache_pool_server __wt_cache_read __wt_cache_read_gen __wt_cache_stats_update __wt_calloc __wt_cell_pack_addr __wt_cell_pack_copy __wt_cell_pack_data __wt_cell_pack_data_match __wt_cell_pack_del __wt_cell_pack_key __wt_cell_pack_ovfl __wt_cell_rle __wt_cell_total_len __wt_cell_type __wt_cell_type_raw __wt_cell_type_reset __wt_cell_type_string __wt_cell_unpack __wt_cell_unpack_copy __wt_cell_unpack_ref __wt_cell_unpack_safe __wt_checkpoint __wt_cksum __wt_close __wt_clsm_init_merge __wt_clsm_open __wt_col_append_new_ins_taken __wt_col_append_new_inshead_taken __wt_col_append_new_inslist_taken __wt_col_append_serial __wt_col_append_serial_func __wt_col_append_unpack __wt_col_leaf_obsolete __wt_col_modify __wt_col_search __wt_compact __wt_compact_evict __wt_compact_page_skip __wt_cond_alloc __wt_cond_destroy __wt_cond_signal __wt_cond_wait __wt_config_check __wt_config_collapse __wt_config_concat __wt_config_get __wt_config_getone __wt_config_getones __wt_config_getraw __wt_config_gets __wt_config_gets_defno __wt_config_init __wt_config_initn __wt_config_next __wt_config_subgetraw __wt_config_subgets __wt_config_subinit __wt_conn_btree_apply __wt_conn_btree_apply_single __wt_conn_btree_close __wt_conn_btree_close_all __wt_conn_btree_discard __wt_conn_btree_discard_single __wt_conn_btree_get __wt_conn_btree_sync_and_close __wt_conn_cache_pool_config __wt_conn_cache_pool_destroy __wt_conn_stat_init __wt_connection_close __wt_connection_destroy __wt_connection_init __wt_connection_open __wt_curbackup_open __wt_curbulk_init __wt_curconfig_open __wt_curdump_create __wt_curfile_create __wt_curfile_open __wt_curfile_truncate __wt_curindex_open __wt_cursor_close __wt_cursor_dup __wt_cursor_get_key __wt_cursor_get_keyv __wt_cursor_get_raw_key __wt_cursor_get_value __wt_cursor_init __wt_cursor_kv_not_set __wt_cursor_noop __wt_cursor_notsup __wt_cursor_set_key __wt_cursor_set_keyv __wt_cursor_set_notsup __wt_cursor_set_raw_key __wt_cursor_set_value __wt_curstat_open __wt_curtable_get_key __wt_curtable_get_value __wt_curtable_open __wt_curtable_set_key __wt_curtable_set_value __wt_curtable_truncate __wt_debug_addr __wt_debug_disk __wt_debug_off __wt_debug_page __wt_debug_tree __wt_debug_tree_all __wt_desc_init __wt_dlclose __wt_dlopen __wt_dlsym __wt_epoch __wt_err __wt_errno __wt_errx __wt_esc_hex_to_raw __wt_event_handler_set __wt_evict_list_clr_page __wt_evict_lru_page __wt_evict_server_wake __wt_eviction_check __wt_exist __wt_filename __wt_filesize __wt_free_int __wt_fsync __wt_ftruncate __wt_get_addr __wt_getline __wt_has_priv __wt_hash_city64 __wt_hash_fnv64 __wt_hazard_clear __wt_hazard_close __wt_hazard_set __wt_hex_to_raw __wt_huffman_close __wt_huffman_decode __wt_huffman_encode __wt_huffman_open __wt_huffman_read __wt_illegal_value __wt_insert_new_ins_taken __wt_insert_new_inshead_taken __wt_insert_new_inslist_taken __wt_insert_serial __wt_insert_serial_func __wt_insert_unpack __wt_ispo2 __wt_kv_return __wt_library_init __wt_log_printf __wt_log_put __wt_log_vprintf __wt_logput_debug __wt_lsm_checkpoint_worker __wt_lsm_cleanup __wt_lsm_copy_chunks __wt_lsm_init __wt_lsm_merge __wt_lsm_merge_update_tree __wt_lsm_meta_read __wt_lsm_meta_write __wt_lsm_stat_init __wt_lsm_tree_bloom_name __wt_lsm_tree_chunk_name __wt_lsm_tree_close_all __wt_lsm_tree_create __wt_lsm_tree_drop __wt_lsm_tree_get __wt_lsm_tree_release __wt_lsm_tree_rename __wt_lsm_tree_setup_chunk __wt_lsm_tree_switch __wt_lsm_tree_truncate __wt_lsm_tree_worker __wt_lsm_worker __wt_meta_btree_apply __wt_meta_checkpoint_addr __wt_meta_checkpoint_clear __wt_meta_checkpoint_last_name __wt_meta_ckptlist_free __wt_meta_ckptlist_get __wt_meta_ckptlist_set __wt_meta_track_checkpoint __wt_meta_track_discard __wt_meta_track_fileop __wt_meta_track_handle_lock __wt_meta_track_insert __wt_meta_track_off __wt_meta_track_on __wt_meta_track_sub_off __wt_meta_track_sub_on __wt_meta_track_update __wt_meta_turtle_init __wt_meta_turtle_read __wt_meta_turtle_update __wt_metadata_cursor __wt_metadata_free_ckptlist __wt_metadata_get __wt_metadata_get_ckptlist __wt_metadata_insert __wt_metadata_load_backup __wt_metadata_open __wt_metadata_read __wt_metadata_remove __wt_metadata_update __wt_msg __wt_nhex_to_raw __wt_nlpo2 __wt_nlpo2_round __wt_off_page __wt_open __wt_open_cursor __wt_open_session __wt_ovfl_cache_col_restart __wt_ovfl_read __wt_page_addr_string __wt_page_and_tree_modify_set __wt_page_hazard_check __wt_page_in_func __wt_page_inmem __wt_page_is_modified __wt_page_modify_init __wt_page_modify_set __wt_page_out __wt_page_release __wt_page_type_string __wt_page_write_gen_check __wt_print_huffman_code __wt_progress __wt_pthread_once __wt_random __wt_raw_to_esc_hex __wt_raw_to_hex __wt_read __wt_readlock __wt_realloc __wt_realloc_aligned __wt_rec_bulk_init __wt_rec_bulk_wrapup __wt_rec_col_fix_bulk_insert __wt_rec_col_var_bulk_insert __wt_rec_destroy __wt_rec_evict __wt_rec_row_bulk_insert __wt_rec_track __wt_rec_track_discard __wt_rec_track_init __wt_rec_track_onpage_addr __wt_rec_track_onpage_ref __wt_rec_track_onpage_srch __wt_rec_track_ovfl_reuse __wt_rec_track_ovfl_srch __wt_rec_track_wrapup __wt_rec_track_wrapup_err __wt_rec_write __wt_remove __wt_rename __wt_row_ikey_alloc __wt_row_insert_alloc __wt_row_key __wt_row_key_copy __wt_row_key_serial __wt_row_key_serial_func __wt_row_key_unpack __wt_row_leaf_keys __wt_row_leaf_obsolete __wt_row_modify __wt_row_random __wt_row_search __wt_row_value __wt_rwlock_alloc __wt_rwlock_destroy __wt_rwunlock __wt_salvage __wt_schema_close_tables __wt_schema_colcheck __wt_schema_colgroup_name __wt_schema_colgroup_source __wt_schema_create __wt_schema_destroy_colgroup __wt_schema_destroy_index __wt_schema_destroy_table __wt_schema_drop __wt_schema_get_colgroup __wt_schema_get_index __wt_schema_get_source __wt_schema_get_table __wt_schema_index_source __wt_schema_name_check __wt_schema_open_colgroups __wt_schema_open_index __wt_schema_open_indices __wt_schema_open_table __wt_schema_project_in __wt_schema_project_merge __wt_schema_project_out __wt_schema_project_slice __wt_schema_remove_table __wt_schema_rename __wt_schema_truncate __wt_schema_worker __wt_scr_alloc_ext __wt_scr_alloc_func __wt_scr_discard __wt_scr_free __wt_scr_free_ext __wt_search_insert __wt_session_add_btree __wt_session_create_strip __wt_session_discard_btree __wt_session_dump __wt_session_dump_all __wt_session_get_btree __wt_session_get_btree_ckpt __wt_session_lock_btree __wt_session_lock_checkpoint __wt_session_release_btree __wt_skip_choose_depth __wt_sleep __wt_spin_destroy __wt_spin_init __wt_spin_lock __wt_spin_trylock __wt_spin_unlock __wt_stack_release __wt_stat_alloc_btree_stats __wt_stat_alloc_connection_stats __wt_stat_alloc_lsm_stats __wt_stat_clear_btree_stats __wt_stat_clear_connection_stats __wt_stat_clear_lsm_stats __wt_strdup __wt_strndup __wt_struct_check __wt_struct_pack __wt_struct_packv __wt_struct_plan __wt_struct_reformat __wt_struct_size __wt_struct_sizev __wt_struct_truncate __wt_struct_unpack __wt_struct_unpackv __wt_sync_file_serial __wt_sync_file_serial_func __wt_sync_file_unpack __wt_table_check __wt_thread_create __wt_thread_join __wt_track_string __wt_tree_walk __wt_tree_walk_delete_rollback __wt_try_writelock __wt_txn_ancient __wt_txn_autocommit_check __wt_txn_begin __wt_txn_checkpoint __wt_txn_commit __wt_txn_destroy __wt_txn_get_evict_snapshot __wt_txn_get_oldest __wt_txn_get_snapshot __wt_txn_global_destroy __wt_txn_global_init __wt_txn_init __wt_txn_modify __wt_txn_modify_ref __wt_txn_read __wt_txn_read_first __wt_txn_read_last __wt_txn_read_skip __wt_txn_release __wt_txn_release_snapshot __wt_txn_rollback __wt_txn_unmodify __wt_txn_update_check __wt_txn_visible __wt_txn_visible_all __wt_txnid_cmp __wt_update_alloc __wt_update_check __wt_update_new_upd_taken __wt_update_obsolete_check __wt_update_obsolete_free __wt_update_serial __wt_update_serial_func __wt_update_unpack __wt_update_upd_taken __wt_upgrade __wt_val_ovfl_cache __wt_verbose __wt_verify __wt_verify_ckpt_load __wt_verify_ckpt_unload __wt_verify_dsk __wt_verrx __wt_vmsg __wt_vpack_int __wt_vpack_negint __wt_vpack_posint __wt_vpack_uint __wt_vsize_int __wt_vsize_negint __wt_vsize_posint __wt_vsize_uint __wt_vunpack_int __wt_vunpack_negint __wt_vunpack_posint __wt_vunpack_uint __wt_write __wt_writelock __wt_yield append_target config_read config_rename config_update copy dump_config dump_forward dump_prefix dump_reverse dump_suffix dump_table_config fnv_64a_buf format hex2byte indexed_freq_compare indexed_symbol_compare insert list_print list_print_checkpoint load_dump main make_table node_queue_close node_queue_dequeue node_queue_enqueue print_config profile_tree pse1 pse2 recursive_free_node set_codes str2recno text usage util_backup util_cerr util_compact util_copyright util_create util_drop util_dump util_err util_flush util_getopt util_list util_load util_loadtext util_name util_printlog util_read util_read_line util_rename util_salvage util_stat util_str2recno util_upgrade util_verify util_write wiredtiger_open wiredtiger_strerror wiredtiger_struct_pack wiredtiger_struct_size wiredtiger_struct_unpack wiredtiger_version
diff --git a/examples/c/ex_config.c b/examples/c/ex_config.c
index 88178380f8e..a38c16b0e86 100644
--- a/examples/c/ex_config.c
+++ b/examples/c/ex_config.c
@@ -46,7 +46,7 @@ int main(void)
/*! [configure cache size] */
if ((ret = wiredtiger_open(home, NULL,
- "create,cache.size=500M", &conn)) != 0)
+ "create,cache_size=500M", &conn)) != 0)
fprintf(stderr, "Error connecting to %s: %s\n",
home, wiredtiger_strerror(ret));
/*! [configure cache size] */
diff --git a/examples/c/ex_test_perf.c b/examples/c/ex_test_perf.c
index 9697f9253a2..533717dba6b 100644
--- a/examples/c/ex_test_perf.c
+++ b/examples/c/ex_test_perf.c
@@ -90,7 +90,7 @@ void usage(void);
CONFIG default_cfg = {
"WT_TEST", /* home */
"lsm:test", /* uri */
- "create,cache.size=200MB", /* conn_config */
+ "create,cache_size=200MB", /* conn_config */
"key_format=S,value_format=S,exclusive=true", /* table_config */
1, /* create */
14023954, /* rand_seed */
@@ -113,7 +113,7 @@ CONFIG default_cfg = {
CONFIG small_cfg = {
"WT_TEST", /* home */
"lsm:test", /* uri */
- "create,cache.size=500MB", /* conn_config */
+ "create,cache_size=500MB", /* conn_config */
"key_format=S,value_format=S,exclusive=true,lsm_chunk_size=5MB,"
"leaf_page_max=16k,internal_page_max=16kb", /* table_config */
1, /* create */
@@ -137,7 +137,7 @@ CONFIG small_cfg = {
CONFIG med_cfg = {
"WT_TEST", /* home */
"lsm:test", /* uri */
- "create,cache.size=1GB", /* conn_config */
+ "create,cache_size=1GB", /* conn_config */
"key_format=S,value_format=S,exclusive=true,lsm_chunk_size=20MB,"
"leaf_page_max=16k,internal_page_max=16kb", /* table_config */
1, /* create */
@@ -161,7 +161,7 @@ CONFIG med_cfg = {
CONFIG large_cfg = {
"WT_TEST", /* home */
"lsm:test", /* uri */
- "create,cache.size=2GB", /* conn_config */
+ "create,cache_size=2GB", /* conn_config */
"key_format=S,value_format=S,exclusive=true,lsm_chunk_size=50MB,"
"leaf_page_max=16k,internal_page_max=16kb", /* table_config */
1, /* create */
diff --git a/src/btree/bt_cache.c b/src/btree/bt_cache.c
index 9622680e951..eed28257dc8 100644
--- a/src/btree/bt_cache.c
+++ b/src/btree/bt_cache.c
@@ -24,7 +24,7 @@ __wt_cache_config(WT_CONNECTION_IMPL *conn, const char *cfg[])
/* Ignore the cache size if a shared cache is configured. */
if (!F_ISSET(conn, WT_CONN_CACHE_POOL) &&
- (ret = __wt_config_gets(session, cfg, "cache.size", &cval)) == 0)
+ (ret = __wt_config_gets(session, cfg, "cache_size", &cval)) == 0)
conn->cache_size = (uint64_t)cval.val;
WT_RET_NOTFOUND_OK(ret);
diff --git a/src/config/config_def.c b/src/config/config_def.c
index 1c771381ec9..ed91b9883e4 100644
--- a/src/config/config_def.c
+++ b/src/config/config_def.c
@@ -8,9 +8,9 @@ __wt_confdfl_colgroup_meta =
WT_CONFIG_CHECK
__wt_confchk_colgroup_meta[] = {
- { "columns", "list", NULL, NULL },
- { "source", "string", NULL, NULL },
- { "type", "string", "choices=[\"file\",\"lsm\"]", NULL },
+ { "columns", "list", NULL, NULL},
+ { "source", "string", NULL, NULL},
+ { "type", "string", "choices=[\"file\",\"lsm\"]", NULL},
{ NULL, NULL, NULL, NULL }
};
@@ -65,8 +65,8 @@ __wt_confdfl_connection_load_extension =
WT_CONFIG_CHECK
__wt_confchk_connection_load_extension[] = {
- { "entry", "string", NULL, NULL },
- { "prefix", "string", NULL, NULL },
+ { "entry", "string", NULL, NULL},
+ { "prefix", "string", NULL, NULL},
{ NULL, NULL, NULL, NULL }
};
@@ -76,35 +76,40 @@ __wt_confdfl_connection_open_session =
WT_CONFIG_CHECK
__wt_confchk_connection_open_session[] = {
- { "isolation", "string", "choices=[\"read-uncommitted\","
- "\"read-committed\",\"snapshot\"]", NULL },
+ { "isolation", "string",
+ "choices=[\"read-uncommitted\",\"read-committed\",\"snapshot\"]",
+ NULL},
{ NULL, NULL, NULL, NULL }
};
const char *
__wt_confdfl_connection_reconfigure =
- "cache=(pool=,pool_chunk=,pool_min=,size=100MB),error_prefix=,"
- "eviction_target=80,eviction_trigger=95,verbose=";
+ "cache_size=100MB,error_prefix=,eviction_target=80,"
+ "eviction_trigger=95,shared_cache=(chunk=5,min=10,name=,size=500MB),"
+ "verbose=";
WT_CONFIG_CHECK
-__wt_confchk_cache_subconfigs[] = {
- { "pool", "string", NULL, NULL },
- { "pool_chunk", "int", "min=1MB,max=10TB", NULL },
- { "pool_min", "int", "min=1MB,max=10TB", NULL },
+__wt_confchk_shared_cache_subconfigs[] = {
+ { "chunk", "int", "min=1,max=100", NULL },
+ { "min", "int", "min=1,max=100", NULL },
+ { "name", "string", NULL, NULL },
{ "size", "int", "min=1MB,max=10TB", NULL },
{ NULL, NULL, NULL, NULL }
};
WT_CONFIG_CHECK
__wt_confchk_connection_reconfigure[] = {
- { "cache", "category", NULL, __wt_confchk_cache_subconfigs },
- { "error_prefix", "string", NULL, NULL },
- { "eviction_target", "int", "min=10,max=99", NULL },
- { "eviction_trigger", "int", "min=10,max=99", NULL },
- { "verbose", "list", "choices=[\"block\",\"cache_pool\",\"ckpt\","
- "\"evict\",\"evictserver\",\"fileops\",\"hazard\",\"lsm\",\"mutex\""
- ",\"read\",\"readserver\",\"reconcile\",\"salvage\",\"verify\","
- "\"write\"]", NULL },
+ { "cache_size", "int", "min=1MB,max=10TB", NULL},
+ { "error_prefix", "string", NULL, NULL},
+ { "eviction_target", "int", "min=10,max=99", NULL},
+ { "eviction_trigger", "int", "min=10,max=99", NULL},
+ { "shared_cache", "category", NULL,
+ __wt_confchk_shared_cache_subconfigs},
+ { "verbose", "list",
+ "choices=[\"block\",\"shared_cache\",\"ckpt\",\"evict\","
+ "\"evictserver\",\"fileops\",\"hazard\",\"lsm\",\"mutex\",\"read\","
+ "\"readserver\",\"reconcile\",\"salvage\",\"verify\",\"write\"]",
+ NULL},
{ NULL, NULL, NULL, NULL }
};
@@ -119,49 +124,49 @@ __wt_confchk_cursor_close[] = {
const char *
__wt_confdfl_file_meta =
- "allocation_size=512B,block_compressor=,cache_resident=0,"
- "checkpoint=,checksum=,collator=,columns=,dictionary=0,format=btree"
- ",huffman_key=,huffman_value=,internal_item_max=0,"
- "internal_key_truncate=,internal_page_max=2KB,key_format=u,"
- "key_gap=10,leaf_item_max=0,leaf_page_max=1MB,lsm_bloom=,"
- "lsm_bloom_bit_count=8,lsm_bloom_config=,lsm_bloom_hash_count=4,"
- "lsm_bloom_newest=0,lsm_bloom_oldest=0,lsm_chunk_size=2MB,"
- "lsm_merge_max=15,lsm_merge_threads=1,prefix_compression=,"
- "split_pct=75,value_format=u,version=(major=0,minor=0)";
+ "allocation_size=512B,block_compressor=,cache_resident=0,checkpoint=,"
+ "checksum=,collator=,columns=,dictionary=0,format=btree,huffman_key=,"
+ "huffman_value=,internal_item_max=0,internal_key_truncate=,"
+ "internal_page_max=2KB,key_format=u,key_gap=10,leaf_item_max=0,"
+ "leaf_page_max=1MB,lsm_bloom=,lsm_bloom_bit_count=8,lsm_bloom_config="
+ ",lsm_bloom_hash_count=4,lsm_bloom_newest=0,lsm_bloom_oldest=0,"
+ "lsm_chunk_size=2MB,lsm_merge_max=15,lsm_merge_threads=1,"
+ "prefix_compression=,split_pct=75,value_format=u,version=(major=0,"
+ "minor=0)";
WT_CONFIG_CHECK
__wt_confchk_file_meta[] = {
- { "allocation_size", "int", "min=512B,max=128MB", NULL },
- { "block_compressor", "string", NULL, NULL },
- { "cache_resident", "boolean", NULL, NULL },
- { "checkpoint", "string", NULL, NULL },
- { "checksum", "boolean", NULL, NULL },
- { "collator", "string", NULL, NULL },
- { "columns", "list", NULL, NULL },
- { "dictionary", "int", "min=0", NULL },
- { "format", "string", "choices=[\"btree\"]", NULL },
- { "huffman_key", "string", NULL, NULL },
- { "huffman_value", "string", NULL, NULL },
- { "internal_item_max", "int", "min=0", NULL },
- { "internal_key_truncate", "boolean", NULL, NULL },
- { "internal_page_max", "int", "min=512B,max=512MB", NULL },
- { "key_format", "format", NULL, NULL },
- { "key_gap", "int", "min=0", NULL },
- { "leaf_item_max", "int", "min=0", NULL },
- { "leaf_page_max", "int", "min=512B,max=512MB", NULL },
- { "lsm_bloom", "boolean", NULL, NULL },
- { "lsm_bloom_bit_count", "int", "min=2,max=1000", NULL },
- { "lsm_bloom_config", "string", NULL, NULL },
- { "lsm_bloom_hash_count", "int", "min=2,max=100", NULL },
- { "lsm_bloom_newest", "boolean", NULL, NULL },
- { "lsm_bloom_oldest", "boolean", NULL, NULL },
- { "lsm_chunk_size", "int", "min=512K,max=500MB", NULL },
- { "lsm_merge_max", "int", "min=2,max=100", NULL },
- { "lsm_merge_threads", "int", "min=1,max=10", NULL },
- { "prefix_compression", "boolean", NULL, NULL },
- { "split_pct", "int", "min=25,max=100", NULL },
- { "value_format", "format", NULL, NULL },
- { "version", "string", NULL, NULL },
+ { "allocation_size", "int", "min=512B,max=128MB", NULL},
+ { "block_compressor", "string", NULL, NULL},
+ { "cache_resident", "boolean", NULL, NULL},
+ { "checkpoint", "string", NULL, NULL},
+ { "checksum", "boolean", NULL, NULL},
+ { "collator", "string", NULL, NULL},
+ { "columns", "list", NULL, NULL},
+ { "dictionary", "int", "min=0", NULL},
+ { "format", "string", "choices=[\"btree\"]", NULL},
+ { "huffman_key", "string", NULL, NULL},
+ { "huffman_value", "string", NULL, NULL},
+ { "internal_item_max", "int", "min=0", NULL},
+ { "internal_key_truncate", "boolean", NULL, NULL},
+ { "internal_page_max", "int", "min=512B,max=512MB", NULL},
+ { "key_format", "format", NULL, NULL},
+ { "key_gap", "int", "min=0", NULL},
+ { "leaf_item_max", "int", "min=0", NULL},
+ { "leaf_page_max", "int", "min=512B,max=512MB", NULL},
+ { "lsm_bloom", "boolean", NULL, NULL},
+ { "lsm_bloom_bit_count", "int", "min=2,max=1000", NULL},
+ { "lsm_bloom_config", "string", NULL, NULL},
+ { "lsm_bloom_hash_count", "int", "min=2,max=100", NULL},
+ { "lsm_bloom_newest", "boolean", NULL, NULL},
+ { "lsm_bloom_oldest", "boolean", NULL, NULL},
+ { "lsm_chunk_size", "int", "min=512K,max=500MB", NULL},
+ { "lsm_merge_max", "int", "min=2,max=100", NULL},
+ { "lsm_merge_threads", "int", "min=1,max=10", NULL},
+ { "prefix_compression", "boolean", NULL, NULL},
+ { "split_pct", "int", "min=25,max=100", NULL},
+ { "value_format", "format", NULL, NULL},
+ { "version", "string", NULL, NULL},
{ NULL, NULL, NULL, NULL }
};
@@ -171,12 +176,12 @@ __wt_confdfl_index_meta =
WT_CONFIG_CHECK
__wt_confchk_index_meta[] = {
- { "columns", "list", NULL, NULL },
- { "columns", "list", NULL, NULL },
- { "key_format", "format", NULL, NULL },
- { "source", "string", NULL, NULL },
- { "type", "string", "choices=[\"file\",\"lsm\"]", NULL },
- { "value_format", "format", NULL, NULL },
+ { "columns", "list", NULL, NULL},
+ { "columns", "list", NULL, NULL},
+ { "key_format", "format", NULL, NULL},
+ { "source", "string", NULL, NULL},
+ { "type", "string", "choices=[\"file\",\"lsm\"]", NULL},
+ { "value_format", "format", NULL, NULL},
{ NULL, NULL, NULL, NULL }
};
@@ -186,12 +191,14 @@ __wt_confdfl_session_begin_transaction =
WT_CONFIG_CHECK
__wt_confchk_session_begin_transaction[] = {
- { "isolation", "string", "choices=[\"read-uncommitted\","
- "\"read-committed\",\"snapshot\"]", NULL },
- { "name", "string", NULL, NULL },
- { "priority", "int", "min=-100,max=100", NULL },
- { "sync", "string", "choices=[\"full\",\"flush\",\"write\","
- "\"none\"]", NULL },
+ { "isolation", "string",
+ "choices=[\"read-uncommitted\",\"read-committed\",\"snapshot\"]",
+ NULL},
+ { "name", "string", NULL, NULL},
+ { "priority", "int", "min=-100,max=100", NULL},
+ { "sync", "string",
+ "choices=[\"full\",\"flush\",\"write\",\"none\"]",
+ NULL},
{ NULL, NULL, NULL, NULL }
};
@@ -201,10 +208,10 @@ __wt_confdfl_session_checkpoint =
WT_CONFIG_CHECK
__wt_confchk_session_checkpoint[] = {
- { "drop", "list", NULL, NULL },
- { "force", "boolean", NULL, NULL },
- { "name", "string", NULL, NULL },
- { "target", "list", NULL, NULL },
+ { "drop", "list", NULL, NULL},
+ { "force", "boolean", NULL, NULL},
+ { "name", "string", NULL, NULL},
+ { "target", "list", NULL, NULL},
{ NULL, NULL, NULL, NULL }
};
@@ -241,51 +248,50 @@ __wt_confdfl_session_create =
"colgroups=,collator=,columns=,columns=,dictionary=0,exclusive=0,"
"format=btree,huffman_key=,huffman_value=,internal_item_max=0,"
"internal_key_truncate=,internal_page_max=2KB,key_format=u,"
- "key_format=u,key_gap=10,leaf_item_max=0,leaf_page_max=1MB,"
- "lsm_bloom=,lsm_bloom_bit_count=8,lsm_bloom_config=,"
- "lsm_bloom_hash_count=4,lsm_bloom_newest=0,lsm_bloom_oldest=0,"
- "lsm_chunk_size=2MB,lsm_merge_max=15,lsm_merge_threads=1,"
- "prefix_compression=,source=,split_pct=75,type=file,value_format=u,"
- "value_format=u";
+ "key_format=u,key_gap=10,leaf_item_max=0,leaf_page_max=1MB,lsm_bloom="
+ ",lsm_bloom_bit_count=8,lsm_bloom_config=,lsm_bloom_hash_count=4,"
+ "lsm_bloom_newest=0,lsm_bloom_oldest=0,lsm_chunk_size=2MB,"
+ "lsm_merge_max=15,lsm_merge_threads=1,prefix_compression=,source=,"
+ "split_pct=75,type=file,value_format=u,value_format=u";
WT_CONFIG_CHECK
__wt_confchk_session_create[] = {
- { "allocation_size", "int", "min=512B,max=128MB", NULL },
- { "block_compressor", "string", NULL, NULL },
- { "cache_resident", "boolean", NULL, NULL },
- { "checksum", "boolean", NULL, NULL },
- { "colgroups", "list", NULL, NULL },
- { "collator", "string", NULL, NULL },
- { "columns", "list", NULL, NULL },
- { "columns", "list", NULL, NULL },
- { "dictionary", "int", "min=0", NULL },
- { "exclusive", "boolean", NULL, NULL },
- { "format", "string", "choices=[\"btree\"]", NULL },
- { "huffman_key", "string", NULL, NULL },
- { "huffman_value", "string", NULL, NULL },
- { "internal_item_max", "int", "min=0", NULL },
- { "internal_key_truncate", "boolean", NULL, NULL },
- { "internal_page_max", "int", "min=512B,max=512MB", NULL },
- { "key_format", "format", NULL, NULL },
- { "key_format", "format", NULL, NULL },
- { "key_gap", "int", "min=0", NULL },
- { "leaf_item_max", "int", "min=0", NULL },
- { "leaf_page_max", "int", "min=512B,max=512MB", NULL },
- { "lsm_bloom", "boolean", NULL, NULL },
- { "lsm_bloom_bit_count", "int", "min=2,max=1000", NULL },
- { "lsm_bloom_config", "string", NULL, NULL },
- { "lsm_bloom_hash_count", "int", "min=2,max=100", NULL },
- { "lsm_bloom_newest", "boolean", NULL, NULL },
- { "lsm_bloom_oldest", "boolean", NULL, NULL },
- { "lsm_chunk_size", "int", "min=512K,max=500MB", NULL },
- { "lsm_merge_max", "int", "min=2,max=100", NULL },
- { "lsm_merge_threads", "int", "min=1,max=10", NULL },
- { "prefix_compression", "boolean", NULL, NULL },
- { "source", "string", NULL, NULL },
- { "split_pct", "int", "min=25,max=100", NULL },
- { "type", "string", "choices=[\"file\",\"lsm\"]", NULL },
- { "value_format", "format", NULL, NULL },
- { "value_format", "format", NULL, NULL },
+ { "allocation_size", "int", "min=512B,max=128MB", NULL},
+ { "block_compressor", "string", NULL, NULL},
+ { "cache_resident", "boolean", NULL, NULL},
+ { "checksum", "boolean", NULL, NULL},
+ { "colgroups", "list", NULL, NULL},
+ { "collator", "string", NULL, NULL},
+ { "columns", "list", NULL, NULL},
+ { "columns", "list", NULL, NULL},
+ { "dictionary", "int", "min=0", NULL},
+ { "exclusive", "boolean", NULL, NULL},
+ { "format", "string", "choices=[\"btree\"]", NULL},
+ { "huffman_key", "string", NULL, NULL},
+ { "huffman_value", "string", NULL, NULL},
+ { "internal_item_max", "int", "min=0", NULL},
+ { "internal_key_truncate", "boolean", NULL, NULL},
+ { "internal_page_max", "int", "min=512B,max=512MB", NULL},
+ { "key_format", "format", NULL, NULL},
+ { "key_format", "format", NULL, NULL},
+ { "key_gap", "int", "min=0", NULL},
+ { "leaf_item_max", "int", "min=0", NULL},
+ { "leaf_page_max", "int", "min=512B,max=512MB", NULL},
+ { "lsm_bloom", "boolean", NULL, NULL},
+ { "lsm_bloom_bit_count", "int", "min=2,max=1000", NULL},
+ { "lsm_bloom_config", "string", NULL, NULL},
+ { "lsm_bloom_hash_count", "int", "min=2,max=100", NULL},
+ { "lsm_bloom_newest", "boolean", NULL, NULL},
+ { "lsm_bloom_oldest", "boolean", NULL, NULL},
+ { "lsm_chunk_size", "int", "min=512K,max=500MB", NULL},
+ { "lsm_merge_max", "int", "min=2,max=100", NULL},
+ { "lsm_merge_threads", "int", "min=1,max=10", NULL},
+ { "prefix_compression", "boolean", NULL, NULL},
+ { "source", "string", NULL, NULL},
+ { "split_pct", "int", "min=25,max=100", NULL},
+ { "type", "string", "choices=[\"file\",\"lsm\"]", NULL},
+ { "value_format", "format", NULL, NULL},
+ { "value_format", "format", NULL, NULL},
{ NULL, NULL, NULL, NULL }
};
@@ -295,7 +301,7 @@ __wt_confdfl_session_drop =
WT_CONFIG_CHECK
__wt_confchk_session_drop[] = {
- { "force", "boolean", NULL, NULL },
+ { "force", "boolean", NULL, NULL},
{ NULL, NULL, NULL, NULL }
};
@@ -311,23 +317,23 @@ __wt_confchk_session_log_printf[] = {
const char *
__wt_confdfl_session_open_cursor =
"append=0,bulk=0,checkpoint=,dump=,next_random=0,no_cache=0,"
- "overwrite=0,raw=0,statistics=0,statistics_clear=0,"
- "statistics_fast=0,target=";
+ "overwrite=0,raw=0,statistics=0,statistics_clear=0,statistics_fast=0,"
+ "target=";
WT_CONFIG_CHECK
__wt_confchk_session_open_cursor[] = {
- { "append", "boolean", NULL, NULL },
- { "bulk", "string", NULL, NULL },
- { "checkpoint", "string", NULL, NULL },
- { "dump", "string", "choices=[\"hex\",\"print\"]", NULL },
- { "next_random", "boolean", NULL, NULL },
- { "no_cache", "boolean", NULL, NULL },
- { "overwrite", "boolean", NULL, NULL },
- { "raw", "boolean", NULL, NULL },
- { "statistics", "boolean", NULL, NULL },
- { "statistics_clear", "boolean", NULL, NULL },
- { "statistics_fast", "boolean", NULL, NULL },
- { "target", "list", NULL, NULL },
+ { "append", "boolean", NULL, NULL},
+ { "bulk", "string", NULL, NULL},
+ { "checkpoint", "string", NULL, NULL},
+ { "dump", "string", "choices=[\"hex\",\"print\"]", NULL},
+ { "next_random", "boolean", NULL, NULL},
+ { "no_cache", "boolean", NULL, NULL},
+ { "overwrite", "boolean", NULL, NULL},
+ { "raw", "boolean", NULL, NULL},
+ { "statistics", "boolean", NULL, NULL},
+ { "statistics_clear", "boolean", NULL, NULL},
+ { "statistics_fast", "boolean", NULL, NULL},
+ { "target", "list", NULL, NULL},
{ NULL, NULL, NULL, NULL }
};
@@ -337,8 +343,9 @@ __wt_confdfl_session_reconfigure =
WT_CONFIG_CHECK
__wt_confchk_session_reconfigure[] = {
- { "isolation", "string", "choices=[\"read-uncommitted\","
- "\"read-committed\",\"snapshot\"]", NULL },
+ { "isolation", "string",
+ "choices=[\"read-uncommitted\",\"read-committed\",\"snapshot\"]",
+ NULL},
{ NULL, NULL, NULL, NULL }
};
@@ -366,7 +373,7 @@ __wt_confdfl_session_salvage =
WT_CONFIG_CHECK
__wt_confchk_session_salvage[] = {
- { "force", "boolean", NULL, NULL },
+ { "force", "boolean", NULL, NULL},
{ NULL, NULL, NULL, NULL }
};
@@ -394,9 +401,9 @@ __wt_confdfl_session_verify =
WT_CONFIG_CHECK
__wt_confchk_session_verify[] = {
- { "dump_address", "boolean", NULL, NULL },
- { "dump_blocks", "boolean", NULL, NULL },
- { "dump_pages", "boolean", NULL, NULL },
+ { "dump_address", "boolean", NULL, NULL},
+ { "dump_blocks", "boolean", NULL, NULL},
+ { "dump_pages", "boolean", NULL, NULL},
{ NULL, NULL, NULL, NULL }
};
@@ -406,42 +413,45 @@ __wt_confdfl_table_meta =
WT_CONFIG_CHECK
__wt_confchk_table_meta[] = {
- { "colgroups", "list", NULL, NULL },
- { "columns", "list", NULL, NULL },
- { "key_format", "format", NULL, NULL },
- { "value_format", "format", NULL, NULL },
+ { "colgroups", "list", NULL, NULL},
+ { "columns", "list", NULL, NULL},
+ { "key_format", "format", NULL, NULL},
+ { "value_format", "format", NULL, NULL},
{ NULL, NULL, NULL, NULL }
};
const char *
__wt_confdfl_wiredtiger_open =
- "buffer_alignment=-1,cache=(pool=,pool_chunk=,pool_min=,size=100MB)"
- ",create=0,direct_io=,error_prefix=,eviction_target=80,"
- "eviction_trigger=95,extensions=,hazard_max=1000,logging=0,"
- "lsm_merge=,multiprocess=0,session_max=50,sync=,transactional=,"
+ "buffer_alignment=-1,cache_size=100MB,create=0,direct_io=,"
+ "error_prefix=,eviction_target=80,eviction_trigger=95,extensions=,"
+ "hazard_max=1000,logging=0,lsm_merge=,multiprocess=0,session_max=50,"
+ "shared_cache=(chunk=5,min=10,name=,size=500MB),sync=,transactional=,"
"use_environment_priv=0,verbose=";
WT_CONFIG_CHECK
__wt_confchk_wiredtiger_open[] = {
- { "buffer_alignment", "int", "min=-1,max=1MB", NULL },
- { "cache", "category", NULL, __wt_confchk_cache_subconfigs },
- { "create", "boolean", NULL, NULL },
- { "direct_io", "list", "choices=[\"data\",\"log\"]", NULL },
- { "error_prefix", "string", NULL, NULL },
- { "eviction_target", "int", "min=10,max=99", NULL },
- { "eviction_trigger", "int", "min=10,max=99", NULL },
- { "extensions", "list", NULL, NULL },
- { "hazard_max", "int", "min=15", NULL },
- { "logging", "boolean", NULL, NULL },
- { "lsm_merge", "boolean", NULL, NULL },
- { "multiprocess", "boolean", NULL, NULL },
- { "session_max", "int", "min=1", NULL },
- { "sync", "boolean", NULL, NULL },
- { "transactional", "boolean", NULL, NULL },
- { "use_environment_priv", "boolean", NULL, NULL },
- { "verbose", "list", "choices=[\"block\",\"cache_pool\",\"ckpt\","
- "\"evict\",\"evictserver\",\"fileops\",\"hazard\",\"lsm\",\"mutex\""
- ",\"read\",\"readserver\",\"reconcile\",\"salvage\",\"verify\","
- "\"write\"]", NULL },
+ { "buffer_alignment", "int", "min=-1,max=1MB", NULL},
+ { "cache_size", "int", "min=1MB,max=10TB", NULL},
+ { "create", "boolean", NULL, NULL},
+ { "direct_io", "list", "choices=[\"data\",\"log\"]", NULL},
+ { "error_prefix", "string", NULL, NULL},
+ { "eviction_target", "int", "min=10,max=99", NULL},
+ { "eviction_trigger", "int", "min=10,max=99", NULL},
+ { "extensions", "list", NULL, NULL},
+ { "hazard_max", "int", "min=15", NULL},
+ { "logging", "boolean", NULL, NULL},
+ { "lsm_merge", "boolean", NULL, NULL},
+ { "multiprocess", "boolean", NULL, NULL},
+ { "session_max", "int", "min=1", NULL},
+ { "shared_cache", "category", NULL,
+ __wt_confchk_shared_cache_subconfigs},
+ { "sync", "boolean", NULL, NULL},
+ { "transactional", "boolean", NULL, NULL},
+ { "use_environment_priv", "boolean", NULL, NULL},
+ { "verbose", "list",
+ "choices=[\"block\",\"shared_cache\",\"ckpt\",\"evict\","
+ "\"evictserver\",\"fileops\",\"hazard\",\"lsm\",\"mutex\",\"read\","
+ "\"readserver\",\"reconcile\",\"salvage\",\"verify\",\"write\"]",
+ NULL},
{ NULL, NULL, NULL, NULL }
};
diff --git a/src/conn/conn_api.c b/src/conn/conn_api.c
index 159ebba1c14..11eb83c3b15 100644
--- a/src/conn/conn_api.c
+++ b/src/conn/conn_api.c
@@ -728,7 +728,7 @@ __conn_verbose_config(WT_SESSION_IMPL *session, const char *cfg[])
uint32_t flag;
} *ft, verbtypes[] = {
{ "block", WT_VERB_block },
- { "cache_pool", WT_VERB_cache_pool },
+ { "shared_cache",WT_VERB_shared_cache },
{ "ckpt", WT_VERB_ckpt },
{ "evict", WT_VERB_evict },
{ "evictserver",WT_VERB_evictserver },
diff --git a/src/conn/conn_cache_pool.c b/src/conn/conn_cache_pool.c
index c42ffcf515a..f7d137aa7bd 100644
--- a/src/conn/conn_cache_pool.c
+++ b/src/conn/conn_cache_pool.c
@@ -40,8 +40,8 @@ __wt_conn_cache_pool_config(WT_SESSION_IMPL *session, const char **cfg)
pool_name = NULL;
cp = NULL;
- WT_RET(__wt_config_gets(session, cfg, "cache.pool", &cval));
- if (cval.len <= 0)
+ WT_RET(__wt_config_gets(session, cfg, "shared_cache.name", &cval));
+ if (cval.len == 0)
return (0);
/*
@@ -56,17 +56,8 @@ __wt_conn_cache_pool_config(WT_SESSION_IMPL *session, const char **cfg)
process_locked = 1;
if (__wt_process.cache_pool == NULL) {
/* Create a cache pool. */
- WT_ERR(__wt_config_gets(
- session, cfg, "cache.size", &cval));
- if (cval.len <= 0) {
- WT_ERR_MSG(session, WT_ERROR,
- "Attempting to join a cache pool that does not "
- "exist: %s. Must specify a pool size if creating.",
- pool_name);
- }
WT_ERR(__wt_calloc_def(conn->default_session, 1, &cp));
created = 1;
- cp->size = cval.val;
cp->name = pool_name;
pool_name = NULL; /* Belongs to the cache pool now. */
TAILQ_INIT(&cp->cache_pool_qh);
@@ -74,33 +65,29 @@ __wt_conn_cache_pool_config(WT_SESSION_IMPL *session, const char **cfg)
WT_ERR(__wt_cond_alloc(conn->default_session,
"cache pool server", 0, &cp->cache_pool_cond));
- WT_ERR(__wt_config_gets(
- session, cfg, "cache.pool_chunk", &cval));
- if (cval.len > 0)
- cp->chunk = cval.val;
- else
- cp->chunk = WT_MAX(
- 50 * WT_MEGABYTE, cp->size / 20);
- WT_ERR(__wt_config_gets(
- session, cfg, "cache.pool_min", &cval));
- if (cval.len > 0)
- cp->min = cval.val;
- else
- cp->min = cp->size / 2;
-
__wt_process.cache_pool = cp;
- WT_VERBOSE_ERR(session, cache_pool,
- "Created cache pool %s. Size: %" PRIu64
- ", chunk size: %" PRIu64 ", min: %" PRIu64,
- cp->name, cp->size, cp->chunk, cp->min);
+ WT_VERBOSE_ERR(session, shared_cache,
+ "Created cache pool %s.", cp->name);
} else if (!WT_STRING_MATCH(
__wt_process.cache_pool->name, pool_name, strlen(pool_name)))
/* Only a single cache pool is supported. */
WT_ERR_MSG(session, WT_ERROR,
"Attempting to join a cache pool that does not exist: %s",
pool_name);
- else
- cp = __wt_process.cache_pool;
+
+ cp = __wt_process.cache_pool;
+ /* Configure the pool. */
+ WT_ERR(__wt_config_gets(session, cfg, "shared_cache.size", &cval));
+ cp->size = cval.val;
+ WT_ERR(__wt_config_gets(session, cfg, "shared_cache.chunk", &cval));
+ cp->chunk = cp->size * ((double)cval.val / 100);
+ WT_ERR(__wt_config_gets(session, cfg, "shared_cache.min", &cval));
+ cp->min = cp->size * ((double)cval.val / 100);
+ WT_VERBOSE_ERR(session, shared_cache,
+ "Configured cache pool %s. Size: %" PRIu64
+ ", chunk size: %" PRIu64 ", min: %" PRIu64,
+ cp->name, cp->size, cp->chunk, cp->min);
+
F_SET(conn, WT_CONN_CACHE_POOL);
__wt_spin_unlock(session, &__wt_process.spinlock);
err: if (process_locked)
@@ -142,7 +129,7 @@ __wt_conn_cache_pool_open(WT_SESSION_IMPL *session)
TAILQ_INSERT_TAIL(&cp->cache_pool_qh, conn, cpq);
__wt_spin_unlock(session, &cp->cache_pool_lock);
locked = 0;
- WT_VERBOSE_ERR(session, cache_pool,
+ WT_VERBOSE_ERR(session, shared_cache,
"Added %s to cache pool %s.", conn->home, cp->name);
/* Start the cache pool server if required. */
@@ -195,7 +182,7 @@ __wt_conn_cache_pool_destroy(WT_CONNECTION_IMPL *conn)
}
/* Ignore any errors - we want to continue closing things down. */
- WT_VERBOSE_VOID(session, cache_pool,
+ WT_VERBOSE_VOID(session, shared_cache,
"Removing %s from cache pool.", entry->home);
TAILQ_REMOVE(&cp->cache_pool_qh, entry, cpq);
@@ -210,7 +197,7 @@ __wt_conn_cache_pool_destroy(WT_CONNECTION_IMPL *conn)
* connection. A new one will be created by the next balance pass.
*/
if (cp->session != NULL && entry == S2C(cp->session)) {
- WT_VERBOSE_VOID(cp->session, cache_pool,
+ WT_VERBOSE_VOID(cp->session, shared_cache,
"Freeing a cache pool session due to connection close.");
wt_session = &cp->session->iface;
WT_TRET(wt_session->close(wt_session, NULL));
@@ -233,7 +220,8 @@ __wt_conn_cache_pool_destroy(WT_CONNECTION_IMPL *conn)
}
__wt_process.cache_pool = NULL;
__wt_spin_unlock(session, &__wt_process.spinlock);
- WT_VERBOSE_VOID(session, cache_pool, "Destroying cache pool.");
+ WT_VERBOSE_VOID(session, shared_cache,
+ "Destroying cache pool.");
/* Shut down the cache pool worker. */
__wt_cond_signal(
conn->default_session, cp->cache_pool_cond);
@@ -310,7 +298,7 @@ __cache_pool_balance(void)
if (cache->cp_current_evict > highest)
highest = cache->cp_current_evict;
}
- WT_VERBOSE_ERR(session, cache_pool,
+ WT_VERBOSE_ERR(session, shared_cache,
"Highest eviction count: %d, entries: %d",
(int)highest, entries);
/* Normalize eviction information across connections. */
@@ -360,7 +348,7 @@ __cache_pool_balance(void)
cache->cp_skip_count = WT_CACHE_POOL_REDUCE_SKIPS;
}
if (added != 0) {
- WT_VERBOSE_ERR(session, cache_pool,
+ WT_VERBOSE_ERR(session, shared_cache,
"Allocated %" PRId64 " to %s",
added, entry->home);
/*
diff --git a/src/docs/cache-configuration.dox b/src/docs/cache-configuration.dox
index a6af7da08cb..1801337a14e 100644
--- a/src/docs/cache-configuration.dox
+++ b/src/docs/cache-configuration.dox
@@ -4,35 +4,36 @@
The WiredTiger cache implements an approximation of a least recently used
algorithm. Ideally the cache should be configured to be large enough to
-hold an applications working set.
+hold an application's working set.
The WiredTiger cache size can be configured when first opening a database via
@ref wiredtiger_open or changed after open using the
WT_CONNECTION::reconfigure method.
-@section cache_pool Overview of WiredTiger cache pool configuration.
+@section shared_cache Overview of WiredTiger shared cache configuration.
WiredTiger supports sharing a single cache among multiple databases within
-a process. This functionality is called a cache pool.
+a process.
-An application configures a cache pool by specifying a pool name and size
+An application configures a shared cache by specifying a shared_cache name
to the @ref wiredtiger_open function. Applications can optionally
set a minimum amount of cache any connection in the pool will be assigned
and the granularity at which the cache pool is redistributed among
-connections - called the chunk size.
+connections - called the chunk size. Both of these options are specified as
+a percentage of the total cache size.
-WiredTiger cache pool tuning options can be configured when first opening a
-database via @ref wiredtiger_open. Cache pool configuration cannot be
-changed once the cache pool has been created.
+WiredTiger shared cache tuning options can be configured when first opening a
+database via @ref wiredtiger_open or changed after open using the
+WT_CONNECTION::reconfigure method.
@section cache_eviction Overview of WiredTiger eviction configuration.
WiredTiger provides several configuration options for tuning how aggressively
pages are evicted from the cache. Different values will result in better
-performance depending on an applications particular workload.
+performance depending on an application's particular workload.
In WiredTiger cache eviction is handled by a separate thread. It is possible
-configure the percentage of cache that needs to be used before the eviction
+to configure the percentage of cache that needs to be used before the eviction
thread will attempt to find pages to free. It is also possible to configure
a target percentage which is the percentage of the cache that needs to be
free before the eviction server sleeps.
diff --git a/src/include/api.h b/src/include/api.h
index c976b444a7b..3bccf3f44d9 100644
--- a/src/include/api.h
+++ b/src/include/api.h
@@ -402,18 +402,18 @@ extern WT_PROCESS __wt_process;
#define WT_SESSION_SALVAGE_QUIET_ERR 0x00000002
#define WT_SESSION_SCHEMA_LOCKED 0x00000001
#define WT_VERB_block 0x00004000
-#define WT_VERB_cache_pool 0x00002000
-#define WT_VERB_ckpt 0x00001000
-#define WT_VERB_evict 0x00000800
-#define WT_VERB_evictserver 0x00000400
-#define WT_VERB_fileops 0x00000200
-#define WT_VERB_hazard 0x00000100
-#define WT_VERB_lsm 0x00000080
-#define WT_VERB_mutex 0x00000040
-#define WT_VERB_read 0x00000020
-#define WT_VERB_readserver 0x00000010
-#define WT_VERB_reconcile 0x00000008
-#define WT_VERB_salvage 0x00000004
+#define WT_VERB_ckpt 0x00002000
+#define WT_VERB_evict 0x00001000
+#define WT_VERB_evictserver 0x00000800
+#define WT_VERB_fileops 0x00000400
+#define WT_VERB_hazard 0x00000200
+#define WT_VERB_lsm 0x00000100
+#define WT_VERB_mutex 0x00000080
+#define WT_VERB_read 0x00000040
+#define WT_VERB_readserver 0x00000020
+#define WT_VERB_reconcile 0x00000010
+#define WT_VERB_salvage 0x00000008
+#define WT_VERB_shared_cache 0x00000004
#define WT_VERB_verify 0x00000002
#define WT_VERB_write 0x00000001
/*
diff --git a/src/include/extern.h b/src/include/extern.h
index 0ffc132d758..3352430f6fa 100644
--- a/src/include/extern.h
+++ b/src/include/extern.h
@@ -563,7 +563,7 @@ extern WT_CONFIG_CHECK __wt_confchk_connection_load_extension[];
extern const char *__wt_confdfl_connection_open_session;
extern WT_CONFIG_CHECK __wt_confchk_connection_open_session[];
extern const char *__wt_confdfl_connection_reconfigure;
-extern WT_CONFIG_CHECK __wt_confchk_cache_subconfigs[];
+extern WT_CONFIG_CHECK __wt_confchk_shared_cache_subconfigs[];
extern WT_CONFIG_CHECK __wt_confchk_connection_reconfigure[];
extern const char *__wt_confdfl_cursor_close;
extern WT_CONFIG_CHECK __wt_confchk_cursor_close[];
diff --git a/src/include/wiredtiger.in b/src/include/wiredtiger.in
index 970805439e8..0b552bb3f9a 100644
--- a/src/include/wiredtiger.in
+++ b/src/include/wiredtiger.in
@@ -994,34 +994,9 @@ struct __wt_connection {
*
* @param connection the connection handle
* @configstart{connection.reconfigure, see dist/api_data.py}
- * @config{cache, cache configuration setup.,a set of related
- * configuration options defined below.}@config{cache.size, maximum heap
- * memory to allocate for the cache.,an integer between 1MB and 10TB;
- * default \c 100MB.}@config{cache.pool, name of a cache pool that is
- * shared between databases.,a string; default
- * empty.}@config{cache.pool_min, minimum amount of cache a connection
- * in a cache pool can have.,an integer between 1MB and 10TB; default \c
- * .}@config{cache.pool_chunk, the granularity that a cache pool is
- * shared out. Only valid if the cache_pool option is also specified.,an
- * integer between 1MB and 10TB; default \c .}
- * @config{error_prefix, prefix string for error messages.,a string;
- * default empty.}
- * @config{eviction_target, continue evicting until the cache becomes
- * less full than this (as a percentage). Must be less than \c
- * eviction_trigger.,an integer between 10 and 99; default \c 80.}
- * @config{eviction_trigger, trigger eviction when the cache becomes
- * this full (as a percentage).,an integer between 10 and 99; default \c
- * 95.}
- * @config{verbose, enable messages for various events. Options are
- * given as a list\, such as
- * <code>"verbose=[evictserver\,read]"</code>.,a list\, with values
- * chosen from the following options: \c "block"\, \c "cache_pool"\, \c
- * "ckpt"\, \c "evict"\, \c "evictserver"\, \c "fileops"\, \c "hazard"\,
- * \c "lsm"\, \c "mutex"\, \c "read"\, \c "readserver"\, \c
- * "reconcile"\, \c "salvage"\, \c "verify"\, \c "write"; default
- * empty.}
- * @configend
- * empty.}
+ * @config{cache_size, maximum heap memory to allocate for the cache. A
+ * database should configure either a cache_size or a shared_cache not
+ * both.,an integer between 1MB and 10TB; default \c 100MB.}
* @config{error_prefix, prefix string for error messages.,a string;
* default empty.}
* @config{eviction_target, continue evicting until the cache becomes
@@ -1030,12 +1005,25 @@ struct __wt_connection {
* @config{eviction_trigger, trigger eviction when the cache becomes
* this full (as a percentage).,an integer between 10 and 99; default \c
* 95.}
+ * @config{shared_cache = (, shared cache configuration options. A
+ * database should configure either a cache_size or a shared_cache not
+ * both.,a set of related configuration options defined
+ * below.}@config{&nbsp;&nbsp;&nbsp;&nbsp;chunk, the granularity that a
+ * shared cache is redistributed as a percentage.,an integer between 1
+ * and 100; default \c 5.}@config{&nbsp;&nbsp;&nbsp;&nbsp;min, minimum
+ * amount of cache a database in a shared cache can have as a
+ * percentage.,an integer between 1 and 100; default \c
+ * 10.}@config{&nbsp;&nbsp;&nbsp;&nbsp;name, name of a cache that is
+ * shared between databases.,a string; default
+ * empty.}@config{&nbsp;&nbsp;&nbsp;&nbsp;size, maximum memory to
+ * allocate for the shared cache.,an integer between 1MB and 10TB;
+ * default \c 500MB.}@config{ ),,}
* @config{verbose, enable messages for various events. Options are
* given as a list\, such as
* <code>"verbose=[evictserver\,read]"</code>.,a list\, with values
- * chosen from the following options: \c "block"\, \c "cache_pool"\, \c
- * "ckpt"\, \c "evict"\, \c "evictserver"\, \c "fileops"\, \c "hazard"\,
- * \c "lsm"\, \c "mutex"\, \c "read"\, \c "readserver"\, \c
+ * chosen from the following options: \c "block"\, \c "shared_cache"\,
+ * \c "ckpt"\, \c "evict"\, \c "evictserver"\, \c "fileops"\, \c
+ * "hazard"\, \c "lsm"\, \c "mutex"\, \c "read"\, \c "readserver"\, \c
* "reconcile"\, \c "salvage"\, \c "verify"\, \c "write"; default
* empty.}
* @configend
@@ -1192,58 +1180,9 @@ struct __wt_connection {
* I/O. By default\, a platform-specific alignment value is used (512 bytes on
* Linux systems\, zero elsewhere).,an integer between -1 and 1MB; default \c
* -1.}
- * @config{cache, cache configuration setup.,a set of related configuration
- * options defined below.}@config{cache.size, maximum heap memory to allocate
- * for the cache.,an integer between 1MB and 10TB; default \c
- * 100MB.}@config{cache.pool, name of a cache pool that is shared between
- * databases.,a string; default empty.}@config{cache.pool_min, minimum amount of
- * cache a connection in a cache pool can have.,an integer between 1MB and 10TB;
- * default \c .}@config{cache.pool_chunk, the granularity that a cache pool is
- * shared out. Only valid if the cache_pool option is also specified.,an integer
- * between 1MB and 10TB; default \c .}
- * @config{create, create the database if it does not exist.,a boolean flag;
- * default \c false.}
- * @config{direct_io, Use \c O_DIRECT to access files. Options are given as a
- * list\, such as <code>"direct_io=[data]"</code>.,a list\, with values chosen
- * from the following options: \c "data"\, \c "log"; default empty.}
- * @config{error_prefix, prefix string for error messages.,a string; default
- * empty.}
- * @config{eviction_target, continue evicting until the cache becomes less full
- * than this (as a percentage). Must be less than \c eviction_trigger.,an
- * integer between 10 and 99; default \c 80.}
- * @config{eviction_trigger, trigger eviction when the cache becomes this full
- * (as a percentage).,an integer between 10 and 99; default \c 95.}
- * @config{extensions, list of shared library extensions to load (using dlopen).
- * Optional values are passed as the \c config parameter to
- * WT_CONNECTION::load_extension. Complex paths may require quoting\, for
- * example\, <code>extensions=("/path/ext.so"="entry=my_entry")</code>.,a list
- * of strings; default empty.}
- * @config{hazard_max, maximum number of simultaneous hazard references per
- * session handle.,an integer greater than or equal to 15; default \c 1000.}
- * @config{logging, enable logging.,a boolean flag; default \c false.}
- * @config{lsm_merge, merge LSM chunks where possible.,a boolean flag; default
- * \c true.}
- * @config{multiprocess, permit sharing between processes (will automatically
- * start an RPC server for primary processes and use RPC for secondary
- * processes). <b>Not yet supported in WiredTiger</b>.,a boolean flag; default
- * \c false.}
- * @config{session_max, maximum expected number of sessions (including server
- * threads).,an integer greater than or equal to 1; default \c 50.}
- * @config{sync, flush files to stable storage when closing or writing
- * checkpoints.,a boolean flag; default \c true.}
- * @config{transactional, support transactional semantics.,a boolean flag;
- * default \c true.}
- * @config{use_environment_priv, use the \c WIREDTIGER_CONFIG and \c
- * WIREDTIGER_HOME environment variables regardless of whether or not the
- * process is running with special privileges. See @ref home for more
- * information.,a boolean flag; default \c false.}
- * @config{verbose, enable messages for various events. Options are given as a
- * list\, such as <code>"verbose=[evictserver\,read]"</code>.,a list\, with
- * values chosen from the following options: \c "block"\, \c "cache_pool"\, \c
- * "ckpt"\, \c "evict"\, \c "evictserver"\, \c "fileops"\, \c "hazard"\, \c
- * "lsm"\, \c "mutex"\, \c "read"\, \c "readserver"\, \c "reconcile"\, \c
- * "salvage"\, \c "verify"\, \c "write"; default empty.}
- * @configend
+ * @config{cache_size, maximum heap memory to allocate for the cache. A database
+ * should configure either a cache_size or a shared_cache not both.,an integer
+ * between 1MB and 10TB; default \c 100MB.}
* @config{create, create the database if it does not exist.,a boolean flag;
* default \c false.}
* @config{direct_io, Use \c O_DIRECT to access files. Options are given as a
@@ -1272,6 +1211,18 @@ struct __wt_connection {
* \c false.}
* @config{session_max, maximum expected number of sessions (including server
* threads).,an integer greater than or equal to 1; default \c 50.}
+ * @config{shared_cache = (, shared cache configuration options. A database
+ * should configure either a cache_size or a shared_cache not both.,a set of
+ * related configuration options defined
+ * below.}@config{&nbsp;&nbsp;&nbsp;&nbsp;chunk, the granularity that a shared
+ * cache is redistributed as a percentage.,an integer between 1 and 100; default
+ * \c 5.}@config{&nbsp;&nbsp;&nbsp;&nbsp;min, minimum amount of cache a database
+ * in a shared cache can have as a percentage.,an integer between 1 and 100;
+ * default \c 10.}@config{&nbsp;&nbsp;&nbsp;&nbsp;name, name of a cache that is
+ * shared between databases.,a string; default
+ * empty.}@config{&nbsp;&nbsp;&nbsp;&nbsp;size, maximum memory to allocate for
+ * the shared cache.,an integer between 1MB and 10TB; default \c 500MB.}@config{
+ * ),,}
* @config{sync, flush files to stable storage when closing or writing
* checkpoints.,a boolean flag; default \c true.}
* @config{transactional, support transactional semantics.,a boolean flag;
@@ -1282,7 +1233,7 @@ struct __wt_connection {
* information.,a boolean flag; default \c false.}
* @config{verbose, enable messages for various events. Options are given as a
* list\, such as <code>"verbose=[evictserver\,read]"</code>.,a list\, with
- * values chosen from the following options: \c "block"\, \c "cache_pool"\, \c
+ * values chosen from the following options: \c "block"\, \c "shared_cache"\, \c
* "ckpt"\, \c "evict"\, \c "evictserver"\, \c "fileops"\, \c "hazard"\, \c
* "lsm"\, \c "mutex"\, \c "read"\, \c "readserver"\, \c "reconcile"\, \c
* "salvage"\, \c "verify"\, \c "write"; default empty.}
diff --git a/test/bloom/test_bloom.c b/test/bloom/test_bloom.c
index cba3fb474d4..aa6100e542c 100644
--- a/test/bloom/test_bloom.c
+++ b/test/bloom/test_bloom.c
@@ -138,7 +138,7 @@ int setup(void)
* end so they can override "standard" configuration.
*/
snprintf(config, sizeof(config),
- "create,error_prefix=\"%s\",cache.size=%" PRIu32 "MB,%s",
+ "create,error_prefix=\"%s\",cache_size=%" PRIu32 "MB,%s",
g.progname, g.c_cache, g.config_open == NULL ? "" : g.config_open);
if ((ret = wiredtiger_open(NULL, &event_handler, config, &conn)) != 0)
diff --git a/test/fops/t.c b/test/fops/t.c
index 3691a7d7c29..538436da652 100644
--- a/test/fops/t.c
+++ b/test/fops/t.c
@@ -144,7 +144,7 @@ wt_startup(char *config_open)
char config_buf[128];
snprintf(config_buf, sizeof(config_buf),
- "create,error_prefix=\"%s\",cache.size=5MB%s%s",
+ "create,error_prefix=\"%s\",cache_size=5MB%s%s",
progname,
config_open == NULL ? "" : ",",
config_open == NULL ? "" : config_open);
diff --git a/test/format/wts.c b/test/format/wts.c
index d68c0a93c7d..24532db56ff 100644
--- a/test/format/wts.c
+++ b/test/format/wts.c
@@ -74,7 +74,7 @@ wts_open(void)
* the standard configuration.
*/
snprintf(config, sizeof(config),
- "create,error_prefix=\"%s\",cache.size=%" PRIu32 "MB,sync=false,"
+ "create,error_prefix=\"%s\",cache_size=%" PRIu32 "MB,sync=false,"
"extensions=[\"%s\",\"%s\", \"%s\"],%s",
g.progname, g.c_cache,
access(BZIP_PATH, R_OK) == 0 ? BZIP_PATH : "",
diff --git a/test/suite/test_config01.py b/test/suite/test_config01.py
index 7cd6212c0e1..7a47ec962c0 100644
--- a/test/suite/test_config01.py
+++ b/test/suite/test_config01.py
@@ -39,7 +39,7 @@ class test_config01(test_base03.test_base03):
def setUpConnectionOpen(self, dir):
wtopen_args = 'create'
if hasattr(self, 'cache_size'):
- wtopen_args += ',cache.size=' + str(self.cache_size)
+ wtopen_args += ',cache_size=' + str(self.cache_size)
conn = wiredtiger.wiredtiger_open(dir, wtopen_args)
self.pr(`conn`)
return conn
diff --git a/test/suite/test_config03.py b/test/suite/test_config03.py
index 57e636e4983..8e1a2007a4b 100644
--- a/test/suite/test_config03.py
+++ b/test/suite/test_config03.py
@@ -97,7 +97,6 @@ class test_config03(test_base03.test_base03):
if value == False:
value = 'false'
args += ',' + var + '=' + str(value)
- args = args.replace('cache_size', 'cache.size')
args += ','
self.pr('wiredtiger_open with args: ' + args)
diff --git a/test/suite/test_config04.py b/test/suite/test_config04.py
index 8b01482ce9c..fdda95e74dc 100644
--- a/test/suite/test_config04.py
+++ b/test/suite/test_config04.py
@@ -80,7 +80,7 @@ class test_config04(wttest.WiredTigerTestCase):
self.populate_and_check()
def common_cache_size_test(self, sizestr, size):
- self.common_test('cache.size=' + sizestr)
+ self.common_test('cache_size=' + sizestr)
cursor = self.session.open_cursor('statistics:', None, None)
cursor.set_key(wiredtiger.stat.cache_bytes_max)
self.assertEqual(cursor.search(), 0)
@@ -124,15 +124,15 @@ class test_config04(wttest.WiredTigerTestCase):
def test_cache_too_small(self):
self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
- lambda: wiredtiger.wiredtiger_open('.', 'create,cache.size=900000'),
- "/Value too small for key 'size' the minimum is/")
+ lambda: wiredtiger.wiredtiger_open('.', 'create,cache_size=900000'),
+ "/Value too small for key 'cache_size' the minimum is/")
def test_cache_too_large(self):
T11 = 11 * self.T # 11 Terabytes
- configstr = 'create,cache.size=' + str(T11)
+ configstr = 'create,cache_size=' + str(T11)
self.assertRaisesWithMessage(wiredtiger.WiredTigerError,
lambda: wiredtiger.wiredtiger_open('.', configstr),
- "/Value too large for key 'size' the maximum is/")
+ "/Value too large for key 'cache_size' the maximum is/")
def test_eviction(self):
self.common_test('eviction_target=84,eviction_trigger=94')
diff --git a/test/suite/test_cursor03.py b/test/suite/test_cursor03.py
index 1be62f5c79c..a7d34cc873d 100644
--- a/test/suite/test_cursor03.py
+++ b/test/suite/test_cursor03.py
@@ -69,7 +69,7 @@ class test_cursor03(TestCursorTracker):
return self.session.open_cursor(tablearg, None, 'append')
def setUpConnectionOpen(self, dir):
- wtopen_args = 'create,cache.size=' + str(self.cache_size)
+ wtopen_args = 'create,cache_size=' + str(self.cache_size)
conn = wiredtiger.wiredtiger_open(dir, wtopen_args)
self.pr(`conn`)
return conn
diff --git a/test/suite/test_schema03.py b/test/suite/test_schema03.py
index 8d2b6f4cb7e..dd66e3f4e0d 100644
--- a/test/suite/test_schema03.py
+++ b/test/suite/test_schema03.py
@@ -286,7 +286,7 @@ class test_schema03(wttest.WiredTigerTestCase):
def setUpConnectionOpen(self, dir):
conn = wiredtiger.wiredtiger_open(dir,
- 'create,cache.size=100m,session_max=1000')
+ 'create,cache_size=100m,session_max=1000')
self.pr(`conn`)
return conn
diff --git a/test/suite/test_cache_pool.py b/test/suite/test_shared_cache.py
index 68a0aff5a94..d7fde8f7149 100644
--- a/test/suite/test_cache_pool.py
+++ b/test/suite/test_shared_cache.py
@@ -35,12 +35,12 @@ import shutil
import wiredtiger, wttest
from helper import key_populate, simple_populate
-# test_cache_pool.py
+# test_shared_cache.py
# Checkpoint tests
-# Test cache pool shared amongst multiple connections.
-class test_cache_pool(wttest.WiredTigerTestCase):
+# Test shared cache shared amongst multiple connections.
+class test_shared_cache(wttest.WiredTigerTestCase):
- uri = 'table:test_cache_pool'
+ uri = 'table:test_shared_cache'
# Setup fairly large items to use up cache
data_str = 'abcdefghijklmnopqrstuvwxyz' * 20
@@ -66,7 +66,7 @@ class test_cache_pool(wttest.WiredTigerTestCase):
def openConnections(
self,
connections,
- pool_opts = ',cache=(pool=pool,size=200M,pool_chunk=20M,pool_min=60M),',
+ pool_opts = ',shared_cache=(name=pool,size=200M,chunk=10,min=30),',
extra_opts = '',
add=0):
if add == 0:
@@ -90,8 +90,8 @@ class test_cache_pool(wttest.WiredTigerTestCase):
self.conns = []
self.sessions = [] # Implicitly closed when closing sessions.
- # Basic test of cache pool
- def test_cache_pool1(self):
+ # Basic test of shared cache
+ def test_shared_cache(self):
nops = 1000
self.openConnections(['WT_TEST1', 'WT_TEST2'])
@@ -100,8 +100,8 @@ class test_cache_pool(wttest.WiredTigerTestCase):
self.add_records(sess, 0, nops)
self.closeConnections()
- # Test of cache pool with more connections
- def test_cache_pool2(self):
+ # Test of shared cache with more connections
+ def test_shared_cache2(self):
nops = 1000
self.openConnections(['WT_TEST1', 'WT_TEST2', 'WT_TEST3', 'WT_TEST4'])
@@ -110,8 +110,8 @@ class test_cache_pool(wttest.WiredTigerTestCase):
self.add_records(sess, 0, nops)
self.closeConnections()
- # Do enough work, so that the cache pool gets used.
- def test_cache_pool3(self):
+ # Do enough work, so that the shared cache gets used.
+ def test_shared_cache3(self):
nops = 10000
self.openConnections(['WT_TEST1', 'WT_TEST2'])
for sess in self.sessions:
@@ -123,7 +123,7 @@ class test_cache_pool(wttest.WiredTigerTestCase):
self.closeConnections()
# Switch the work between connections, to test rebalancing.
- def test_cache_pool4(self):
+ def test_shared_cache4(self):
# About 100 MB of data with ~250 byte values.
nops = 200000
self.openConnections(['WT_TEST1', 'WT_TEST2'])
@@ -133,8 +133,8 @@ class test_cache_pool(wttest.WiredTigerTestCase):
self.add_records(sess, 0, nops)
self.closeConnections()
- # Add a new connection once the pool is already established.
- def test_cache_pool5(self):
+ # Add a new connection once the shared cache is already established.
+ def test_shared_cache5(self):
nops = 1000
self.openConnections(['WT_TEST1', 'WT_TEST2'])
@@ -149,7 +149,7 @@ class test_cache_pool(wttest.WiredTigerTestCase):
self.closeConnections()
# Close a connection and keep using other connections.
- def test_cache_pool6(self):
+ def test_shared_cache6(self):
nops = 10000
self.openConnections(['WT_TEST1', 'WT_TEST2', 'WT_TEST3'])
@@ -165,31 +165,31 @@ class test_cache_pool(wttest.WiredTigerTestCase):
# Test verbose output
@unittest.skip("Verbose output handling")
- def test_cache_pool7(self):
+ def test_shared_cache7(self):
nops = 1000
self.openConnections(
- ['WT_TEST1', 'WT_TEST2'], extra_opts="verbose=[cache_pool]")
+ ['WT_TEST1', 'WT_TEST2'], extra_opts="verbose=[shared_cache]")
for sess in self.sessions:
sess.create(self.uri, "key_format=S,value_format=S")
self.add_records(sess, 0, nops)
self.closeConnections()
- # Test opening a connection outside of the cache pool
- def test_cache_pool8(self):
+ # Test opening a connection outside of the shared cache
+ def test_shared_cache8(self):
nops = 1000
self.openConnections(['WT_TEST1', 'WT_TEST2'])
- self.openConnections(['WT_TEST3'], add=1, pool_opts=',cache=(size=50M)')
+ self.openConnections(['WT_TEST3'], add=1, pool_opts=',cache_size=50M')
for sess in self.sessions:
sess.create(self.uri, "key_format=S,value_format=S")
self.add_records(sess, 0, nops)
self.closeConnections()
# Test default config values
- def test_cache_pool9(self):
+ def test_shared_cache9(self):
nops = 1000
- self.openConnections(['WT_TEST1', 'WT_TEST2'], pool_opts=',cache=(pool=pool,size=200M)')
+ self.openConnections(['WT_TEST1', 'WT_TEST2'], pool_opts=',shared_cache=(name=pool,size=200M)')
for sess in self.sessions:
sess.create(self.uri, "key_format=S,value_format=S")
diff --git a/test/thread/t.c b/test/thread/t.c
index 138b883a67b..313f63d7420 100644
--- a/test/thread/t.c
+++ b/test/thread/t.c
@@ -158,7 +158,7 @@ wt_connect(char *config_open)
char config[128];
snprintf(config, sizeof(config),
- "create,error_prefix=\"%s\",cache.size=5MB%s%s",
+ "create,error_prefix=\"%s\",cache_size=5MB%s%s",
progname,
config_open == NULL ? "" : ",",
config_open == NULL ? "" : config_open);