aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2013-02-15 14:30:47 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2013-02-15 14:30:47 +0000
commitcb023645f02e119debf6124da07b90554b8542aa (patch)
tree5e99f30c62b0b8add10ca33f8b439e52a444a2ea /contrib
parentdc91d1f488ce8aa6f0eacf29da582080b1355031 (diff)
downloadgnunet-cb023645f02e119debf6124da07b90554b8542aa.tar.gz
gnunet-cb023645f02e119debf6124da07b90554b8542aa.zip
Hacks to reduce per-peer load on CPU by increasing transport retransmission
timeouts. This helps to keep the load on testbed node low. Thanks Bart!
Diffstat (limited to 'contrib')
-rw-r--r--contrib/testbed_perfhacks.patch90
1 files changed, 90 insertions, 0 deletions
diff --git a/contrib/testbed_perfhacks.patch b/contrib/testbed_perfhacks.patch
new file mode 100644
index 000000000..1ad524a30
--- /dev/null
+++ b/contrib/testbed_perfhacks.patch
@@ -0,0 +1,90 @@
1Index: src/include/gnunet_constants.h
2===================================================================
3--- src/include/gnunet_constants.h (revision 26030)
4+++ src/include/gnunet_constants.h (working copy)
5@@ -49,7 +49,7 @@
6 * After how long do we consider a connection to a peer dead
7 * if we don't receive messages from the peer?
8 */
9-#define GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 5)
10+#define GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_YEARS, 5)
11
12 /**
13 * How long do we delay reading more from a peer after a quota violation?
14@@ -61,7 +61,7 @@
15 * even if we assume that the service commonly does not
16 * respond instantly (DNS, Database, etc.).
17 */
18-#define GNUNET_CONSTANTS_SERVICE_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 10)
19+#define GNUNET_CONSTANTS_SERVICE_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_YEARS, 10)
20
21 /**
22 * How long do we delay messages to get larger packet sizes (CORKing)?
23Index: src/transport/gnunet-service-transport_neighbours.c
24===================================================================
25--- src/transport/gnunet-service-transport_neighbours.c (revision 26030)
26+++ src/transport/gnunet-service-transport_neighbours.c (working copy)
27@@ -65,7 +65,7 @@
28 * send 3 keepalives in each interval, so 3 messages would need to be
29 * lost in a row for a disconnect).
30 */
31-#define KEEPALIVE_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 100)
32+#define KEEPALIVE_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_YEARS, 100)
33
34 /**
35 * How long are we willing to wait for a response from ATS before timing out?
36Index: src/transport/gnunet-service-transport_validation.c
37===================================================================
38--- src/transport/gnunet-service-transport_validation.c (revision 26030)
39+++ src/transport/gnunet-service-transport_validation.c (working copy)
40@@ -43,7 +43,7 @@
41 * OTOH, we don't want to spend too much time generating PONG signatures,
42 * so they must have some lifetime to reduce our CPU usage.
43 */
44-#define PONG_SIGNATURE_LIFETIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 1)
45+#define PONG_SIGNATURE_LIFETIME GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 12)
46
47 /**
48 * After how long do we expire an address in a HELLO that we just
49@@ -58,24 +58,24 @@
50 * we cannot validate (because after this time we can destroy the
51 * validation record).
52 */
53-#define UNVALIDATED_PING_KEEPALIVE GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 5)
54+#define UNVALIDATED_PING_KEEPALIVE GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 4)
55
56 /**
57 * How often do we PING an address that we have successfully validated
58 * in the past but are not actively using? Should be (significantly)
59 * smaller than HELLO_ADDRESS_EXPIRATION.
60 */
61-#define VALIDATED_PING_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 15)
62+#define VALIDATED_PING_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_HOURS, 6)
63
64 /**
65 * How often do we PING an address that we are currently using?
66 */
67-#define CONNECTED_PING_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 2)
68+#define CONNECTED_PING_FREQUENCY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_YEARS, 2)
69
70 /**
71 * How much delay is acceptable for sending the PING or PONG?
72 */
73-#define ACCEPTABLE_PING_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 1)
74+#define ACCEPTABLE_PING_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 1)
75
76 /**
77 * Size of the validation map hashmap.
78@@ -745,9 +745,9 @@
79 void
80 GST_validation_start (unsigned int max_fds)
81 {
82- validation_next = GNUNET_TIME_absolute_get();
83- validation_delay.rel_value = (GNUNET_CONSTANTS_IDLE_CONNECTION_TIMEOUT.rel_value) / max_fds;
84- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Delay between validations: %u ms\n ", validation_delay.rel_value);
85+ validation_next = GNUNET_TIME_absolute_get();
86+ validation_delay.rel_value = GNUNET_TIME_UNIT_MILLISECONDS.rel_value;
87+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Delay between validations: %u ms\n ", validation_delay.rel_value);
88 validation_map = GNUNET_CONTAINER_multihashmap_create (VALIDATION_MAP_SIZE,
89 GNUNET_NO);
90 pnc = GNUNET_PEERINFO_notify (GST_cfg, &process_peerinfo_hello, NULL);