Changeset 9283
- Timestamp:
- 04/19/12 10:01:24 (13 months ago)
- Location:
- branches/stable/src
- Files:
-
- 3 modified
-
common/misc/server-config.c (modified) (3 diffs)
-
common/misc/server-config.h (modified) (1 diff)
-
server/tree-communicate.sm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/src/common/misc/server-config.c
r9277 r9283 126 126 static DOTCONF_CB(directio_ops_per_queue); 127 127 static DOTCONF_CB(directio_timeout); 128 static DOTCONF_CB(tree_width); 129 static DOTCONF_CB(tree_threshhold); 128 130 129 131 static FUNC_ERRORHANDLER(errorhandler); … … 1019 1021 CTX_STORAGEHINTS, "1000"}, 1020 1022 1023 /* Specifies the number of partitions to use for tree communication. */ 1024 {"TreeWidth", ARG_INT, tree_width, NULL, 1025 CTX_FILESYSTEM, "2"}, 1026 1027 /* Specifies the minimum number of servers to contact before tree communication kicks in. */ 1028 {"TreeThreshhold", ARG_INT, tree_threshhold, NULL, 1029 CTX_FILESYSTEM, "2"}, 1030 1021 1031 LAST_OPTION 1022 1032 }; … … 3028 3038 } 3029 3039 3040 DOTCONF_CB(tree_width) 3041 { 3042 struct server_configuration_s *config_s = 3043 (struct server_configuration_s *)cmd->context; 3044 3045 config_s->tree_width = cmd->data.value; 3046 3047 return NULL; 3048 } 3049 3050 DOTCONF_CB(tree_threshhold) 3051 { 3052 struct server_configuration_s *config_s = 3053 (struct server_configuration_s *)cmd->context; 3054 3055 config_s->tree_threshhold = cmd->data.value; 3056 3057 return NULL; 3058 } 3059 3030 3060 /* 3031 3061 * Function: PINT_config_release -
branches/stable/src/common/misc/server-config.h
r9277 r9283 203 203 int trove_method; 204 204 void *private_data; 205 int32_t tree_width; 206 int32_t tree_threshhold; 205 207 } server_configuration_s; 206 208 -
branches/stable/src/server/tree-communicate.sm
r8869 r9283 33 33 #include "extent-utils.h" 34 34 35 #define MAX_PARTITIONS 235 //#define MAX_PARTITIONS 2 36 36 37 37 enum … … 247 247 if (s_op->u.tree_communicate.handle_array_remote_count > 0) { 248 248 249 /* Decide how to divide the remote handles. If there are only a few ( MAX_PARTITIONS or250 fewer) then go ahead and send to each remaining server individually. */251 if (s_op->u.tree_communicate.handle_array_remote_count > MAX_PARTITIONS)249 /* Decide how to divide the remote handles. If there are only a few (fewer than 250 tree_threshhold from the config file) then go ahead and send to each remaining server individually. */ 251 if (s_op->u.tree_communicate.handle_array_remote_count > server_config->tree_threshhold) 252 252 { 253 num_partitions = MAX_PARTITIONS;253 num_partitions = server_config->tree_width; 254 254 num_files_per_server = s_op->u.tree_communicate.handle_array_remote_count / 255 MAX_PARTITIONS;255 server_config->tree_width; 256 256 if (num_partitions * num_files_per_server < 257 257 s_op->u.tree_communicate.handle_array_remote_count) {
