diff options
author | Keith Bostic <keith@wiredtiger.com> | 2013-12-06 14:58:11 -0500 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2013-12-06 14:58:11 -0500 |
commit | add06757e64c7ce868046ee9b987edcac40366c0 (patch) | |
tree | 5e27c4c899988bd7caeafd851d72cd1155d4fac7 | |
parent | 8f92bf34bebcf2890baac5b29058a23cd6635f80 (diff) | |
download | mongo-add06757e64c7ce868046ee9b987edcac40366c0.tar.gz |
Add a bunch of the newer LSM configuration options, but leave turned off
for now.
-rw-r--r-- | test/format/config.h | 60 | ||||
-rw-r--r-- | test/format/format.h | 11 | ||||
-rw-r--r-- | test/format/wts.c | 30 |
3 files changed, 79 insertions, 22 deletions
diff --git a/test/format/config.h b/test/format/config.h index 80db7390bb2..352398a54ee 100644 --- a/test/format/config.h +++ b/test/format/config.h @@ -71,16 +71,36 @@ typedef struct { #define CONF_RAND(cp) MMRAND((cp)->min, (cp)->maxrand) static CONFIG c[] = { + { "auto_throttle", + "if LSM inserts are throttled", /* 90% */ + 0x0, C_BOOL, 90, 0, 0, &g.c_auto_throttle, NULL }, + { "firstfit", - "if allocation is firstfit", /* 10% */ + "if allocation is firstfit", /* 10% */ 0x0, C_BOOL, 10, 0, 0, &g.c_firstfit, NULL }, { "bitcnt", "number of bits for fixed-length column-store files", C_FIX, 0x0, 1, 8, 8, &g.c_bitcnt, NULL }, + { "bloom", + "if bloom filters are configured", /* 95% */ + 0x0, C_BOOL, 95, 0, 0, &g.c_bloom, NULL }, + + { "bloom_oldest", + "if bloom_oldest=true", /* 10% */ + 0x0, C_BOOL, 10, 0, 0, &g.c_bloom_oldest, NULL }, + + { "bloom_bit_count", + "number of bits per item for LSM bloom filters", + 0x0, 0x0, 4, 32, 1000, &g.c_bloom_bit_count, NULL }, + + { "bloom_hash_count", + "number of hash values per item for LSM bloom filters", + 0x0, 0x0, 4, 16, 100, &g.c_bloom_hash_count, NULL }, + { "bloom_oldest", - "if bloom_oldest=true", /* 10% */ + "if bloom_oldest=true", /* 10% */ 0x0, C_BOOL, 10, 0, 0, &g.c_bloom_oldest, NULL }, { "cache", @@ -92,7 +112,7 @@ static CONFIG c[] = { 0x0, C_IGNORE|C_STRING, 1, 3, 3, NULL, &g.c_checksum }, { "compaction", - "if compaction is running", /* 10% */ + "if compaction is running", /* 10% */ 0x0, C_BOOL, 10, 0, 0, &g.c_compact, NULL }, { "compression", @@ -100,7 +120,7 @@ static CONFIG c[] = { 0x0, C_IGNORE|C_STRING, 1, 5, 5, NULL, &g.c_compression }, { "data_extend", - "if data files are extended", /* 5% */ + "if data files are extended", /* 5% */ 0x0, C_BOOL, 5, 0, 0, &g.c_data_extend, NULL }, { "data_source", @@ -112,7 +132,7 @@ static CONFIG c[] = { 0x0, C_OPS, 0, 45, 90, &g.c_delete_pct, NULL }, { "dictionary", - "if values are dictionary compressed", /* 20% */ + "if values are dictionary compressed", /* 20% */ C_ROW | C_VAR, C_BOOL, 20, 0, 0, &g.c_dictionary, NULL }, { "file_type", @@ -120,15 +140,15 @@ static CONFIG c[] = { 0x0, C_IGNORE|C_STRING, 1, 3, 3, NULL, &g.c_file_type }, { "hot_backups", - "if hot backups are enabled", /* 5% */ + "if hot backups are enabled", /* 5% */ 0x0, C_BOOL, 5, 0, 0, &g.c_hot_backups, NULL }, { "huffman_key", - "if keys are huffman encoded", /* 20% */ + "if keys are huffman encoded", /* 20% */ C_ROW, C_BOOL, 20, 0, 0, &g.c_huffman_key, NULL }, { "huffman_value", - "if values are huffman encoded", /* 20% */ + "if values are huffman encoded", /* 20% */ C_ROW|C_VAR, C_BOOL, 20, 0, 0, &g.c_huffman_value, NULL }, { "insert_pct", @@ -136,7 +156,7 @@ static CONFIG c[] = { 0x0, C_OPS, 0, 45, 90, &g.c_insert_pct, NULL }, { "internal_key_truncation", - "if values are huffman encoded", /* 2% */ + "if values are huffman encoded", /* 2% */ 0x0, C_BOOL, 2, 0, 0, &g.c_internal_key_truncation, NULL }, { "internal_page_max", @@ -159,20 +179,32 @@ static CONFIG c[] = { "maximum size of Btree leaf nodes", 0x0, 0x0, 9, 17, 27, &g.c_leaf_page_max, NULL }, + { "merge_max", + "the maximum number of chunks to include in a merge operation", + 0x0, 0x0, 2, 100, 100, &g.c_merge_max, NULL }, + + { "merge_threads", + "the number of threads to perform merge operations", + 0x0, 0x0, 1, 10, 10, &g.c_merge_threads, NULL }, + { "ops", "the number of modification operations done per run", 0x0, 0x0, 0, M(2), M(100), &g.c_ops, NULL }, - { "prefix", - "if keys are prefix compressed", /* 80% */ - C_ROW, C_BOOL, 80, 0, 0, &g.c_prefix, NULL }, + { "prefix_compression", + "if keys are prefix compressed", /* 80% */ + C_ROW, C_BOOL, 80, 0, 0, &g.c_prefix_compression, NULL }, + + { "prefix_compression_min", + "minimum gain before prefix compression is used", + C_ROW, 0x0, 0, 8, 256, &g.c_prefix_compression_min, NULL }, { "repeat_data_pct", "percent duplicate values in row- or variable-length column-stores", C_ROW|C_VAR, 0x0, 0, 90, 90, &g.c_repeat_data_pct, NULL }, { "reverse", - "collate in reverse order", /* 10% */ + "collate in reverse order", /* 10% */ 0x0, C_BOOL, 10, 0, 0, &g.c_reverse, NULL }, { "rows", @@ -188,7 +220,7 @@ static CONFIG c[] = { 0x0, 0x0, 40, 85, 85, &g.c_split_pct, NULL }, { "statistics", - "maintain statistics", /* 20% */ + "maintain statistics", /* 20% */ 0x0, C_BOOL, 20, 0, 0, &g.c_statistics, NULL }, { "threads", diff --git a/test/format/format.h b/test/format/format.h index 5930bcc6272..28306dee757 100644 --- a/test/format/format.h +++ b/test/format/format.h @@ -130,7 +130,11 @@ typedef struct { char *config_open; /* Command-line configuration */ - u_int c_bitcnt; /* Config values */ + u_int c_auto_throttle; /* Config values */ + u_int c_bitcnt; + u_int c_bloom; + u_int c_bloom_bit_count; + u_int c_bloom_hash_count; u_int c_bloom_oldest; u_int c_cache; u_int c_compact; @@ -153,8 +157,11 @@ typedef struct { u_int c_key_max; u_int c_key_min; u_int c_leaf_page_max; + u_int c_merge_max; + u_int c_merge_threads; u_int c_ops; - u_int c_prefix; + u_int c_prefix_compression; + u_int c_prefix_compression_min; u_int c_repeat_data_pct; u_int c_reverse; u_int c_rows; diff --git a/test/format/wts.c b/test/format/wts.c index 080f51c0fcf..401e005382f 100644 --- a/test/format/wts.c +++ b/test/format/wts.c @@ -145,7 +145,7 @@ wts_create(void) WT_SESSION *session; uint32_t maxintlpage, maxintlitem, maxleafpage, maxleafitem; int ret; - char config[2048], *end, *p; + char config[4096], *end, *p; conn = g.wts_conn; @@ -200,7 +200,11 @@ wts_create(void) if (g.c_huffman_key) p += snprintf(p, (size_t)(end - p), ",huffman_key=english"); - if (!g.c_prefix) + if (g.c_prefix_compression) + p += snprintf(p, (size_t)(end - p), + ",prefix_compression_min=%u", + g.c_prefix_compression_min); + else p += snprintf(p, (size_t)(end - p), ",prefix_compression=false"); if (g.c_reverse) @@ -269,10 +273,24 @@ wts_create(void) p += snprintf(p, (size_t)(end - p), ",type=kvsbdb"); if (DATASOURCE("lsm")) { - p += snprintf(p, (size_t)(end - p), ",type=lsm"); - if (g.c_bloom_oldest) - p += snprintf( - p, (size_t)(end - p), ",lsm=(bloom_oldest=true)"); + p += snprintf(p, (size_t)(end - p), ",type=lsm,lsm=("); +#if 0 + p += snprintf(p, (size_t)(end - p), + "auto_throttle=%s,", g.c_auto_throttle ? "true" : "false"); + p += snprintf(p, (size_t)(end - p), + "bloom=%s,", g.c_bloom? "true" : "false"); + p += snprintf(p, (size_t)(end - p), + "bloom_bit_count=%u,", g.c_bloom_bit_count); + p += snprintf(p, (size_t)(end - p), + "bloom_hash_count=%u,", g.c_bloom_hash_count); + p += snprintf(p, (size_t)(end - p), + "bloom_oldest=%s,", g.c_bloom_oldest ? "true" : "false"); + p += snprintf(p, (size_t)(end - p), + "merge_max=%u,", g.c_merge_max); + p += snprintf(p, (size_t)(end - p), + "merge_threads=%u,", g.c_merge_threads); +#endif + p += snprintf(p, (size_t)(end - p), ",)"); } if (DATASOURCE("memrata")) |