aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorharsha <harsha@140774ce-b5e7-0310-ab8b-a85725594a96>2013-01-25 20:38:28 +0000
committerharsha <harsha@140774ce-b5e7-0310-ab8b-a85725594a96>2013-01-25 20:38:28 +0000
commitc509a9979b21f09a6b1d27454c05ed9be8fe64b3 (patch)
tree5e867240aacf127bd8b710ac79f6f5145036096b
parent9dd40e228c05dc35bcc106964c98523c82b4a831 (diff)
read MAX_OPEN_FDS from configuration
git-svn-id: https://gnunet.org/svn/gnunet@25917 140774ce-b5e7-0310-ab8b-a85725594a96
-rw-r--r--src/testbed/gnunet-service-testbed.c7
-rw-r--r--src/testbed/gnunet-service-testbed.h5
-rw-r--r--src/testbed/testbed.conf.in3
3 files changed, 8 insertions, 7 deletions
diff --git a/src/testbed/gnunet-service-testbed.c b/src/testbed/gnunet-service-testbed.c
index 56bac51c9d..ba693f1f66 100644
--- a/src/testbed/gnunet-service-testbed.c
+++ b/src/testbed/gnunet-service-testbed.c
@@ -2188,13 +2188,18 @@ testbed_run (void *cls, struct GNUNET_SERVER_Handle *server,
&num));
GST_cache_init ((unsigned int) num);
GNUNET_assert (GNUNET_OK ==
+ GNUNET_CONFIGURATION_get_value_number (cfg, "TESTBED",
+ "MAX_OPEN_FDS",
+ &num));
+ GST_opq_openfds =
+ GNUNET_TESTBED_operation_queue_create_ ((unsigned int) num);
+ GNUNET_assert (GNUNET_OK ==
GNUNET_CONFIGURATION_get_value_string (cfg, "testbed",
"HOSTNAME", &hostname));
our_config = GNUNET_CONFIGURATION_dup (cfg);
GNUNET_SERVER_add_handlers (server, message_handlers);
GNUNET_SERVER_disconnect_notify (server, &client_disconnect_cb, NULL);
ss_map = GNUNET_CONTAINER_multihashmap_create (5, GNUNET_NO);
- GST_opq_openfds = GNUNET_TESTBED_operation_queue_create_ (GST_QLEN_OPENFDS);
shutdown_task_id =
GNUNET_SCHEDULER_add_delayed_with_priority (GNUNET_TIME_UNIT_FOREVER_REL,
GNUNET_SCHEDULER_PRIORITY_IDLE,
diff --git a/src/testbed/gnunet-service-testbed.h b/src/testbed/gnunet-service-testbed.h
index 6165c91e55..61a69511b2 100644
--- a/src/testbed/gnunet-service-testbed.h
+++ b/src/testbed/gnunet-service-testbed.h
@@ -55,11 +55,6 @@
#define LIST_GROW_STEP 10
/**
- * How long should the operation queue for open file descriptors be?
- */
-#define GST_QLEN_OPENFDS 512
-
-/**
* Default timeout for operations which may take some time
*/
#define TIMEOUT GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 15)
diff --git a/src/testbed/testbed.conf.in b/src/testbed/testbed.conf.in
index 1634cf95d3..38d6e58575 100644
--- a/src/testbed/testbed.conf.in
+++ b/src/testbed/testbed.conf.in
@@ -12,6 +12,7 @@ UNIXPATH = /tmp/gnunet-service-testbed.sock
UNIX_MATCH_UID = YES
UNIX_MATCH_GID = YES
MAX_PARALLEL_OPERATIONS = 1000
-MAX_PARALLEL_SERVICE_CONNECTIONS = 1000
+MAX_PARALLEL_SERVICE_CONNECTIONS = 256
MAX_PARALLEL_TOPOLOGY_CONFIG_OPERATIONS = 1
HELLO_CACHE_SIZE = 30
+MAX_OPEN_FDS = 512