[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] 77/164: Added new algo to determine operation mode
From: |
gnunet |
Subject: |
[gnunet] 77/164: Added new algo to determine operation mode |
Date: |
Fri, 30 Jul 2021 15:32:23 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository gnunet.
commit 6e0f1ea5e07f4535312e4ba9c356e1f3ea29aba7
Author: Elias Summermatter <elias.summermatter@seccom.ch>
AuthorDate: Tue May 11 16:45:17 2021 +0200
Added new algo to determine operation mode
---
src/setu/gnunet-service-setu.c | 39 ++++++++++++++++++++++++++-------------
src/setu/perf_setu_api.c | 2 +-
2 files changed, 27 insertions(+), 14 deletions(-)
diff --git a/src/setu/gnunet-service-setu.c b/src/setu/gnunet-service-setu.c
index 4fe211706..d52a75149 100644
--- a/src/setu/gnunet-service-setu.c
+++ b/src/setu/gnunet-service-setu.c
@@ -893,7 +893,7 @@ estimate_best_mode_of_operation(uint64_t avg_element_size,
uint16_t estimated_total_diff = (est_set_diff_remote + est_set_diff_local);
/* Estimate byte required if we send first */
- uint64_t total_elements_to_send_local_send_first = local_set_size +
est_set_diff_remote;
+ uint64_t total_elements_to_send_local_send_first = est_set_diff_remote +
local_set_size;
uint64_t total_bytes_full_local_send_first = (avg_element_size *
total_elements_to_send_local_send_first) + \
(total_elements_to_send_local_send_first * sizeof(struct
GNUNET_SETU_ElementMessage)) + \
@@ -909,6 +909,12 @@ estimate_best_mode_of_operation(uint64_t avg_element_size,
(RTT_MIN_FULL + 0.5) * bandwith_latency_tradeoff + \
SIZEOF_REQUEST_FULL;
+ LOG (GNUNET_ERROR_TYPE_ERROR,
+ "YYYYY::::: est_set_diff_remote %u, local_set_size %u \n",
est_set_diff_remote, local_set_size);
+
+ LOG (GNUNET_ERROR_TYPE_ERROR,
+ "XXX::::: total_elements_to_send_local_send_first %u,
total_elements_to_send_remote_send_first %u \n",
total_elements_to_send_local_send_first,
total_elements_to_send_remote_send_first);
+
/*
* Calculate bytes for differential Sync
*/
@@ -943,9 +949,16 @@ estimate_best_mode_of_operation(uint64_t avg_element_size,
uint64_t total_bytes_diff = (element_size + done_size + inquery_size +
demand_size + offer_size + ibf_bytes) + \
( DIFFERENTIAL_RTT_MEAN *
bandwith_latency_tradeoff );
- uint64_t full_min = MIN(total_elements_to_send_local_send_first,
total_elements_to_send_remote_send_first);
+ uint64_t full_min = MIN(total_bytes_full_local_send_first,
total_bytes_full_local_send_first);
/* Decide between full and differential sync */
+ LOG (GNUNET_ERROR_TYPE_ERROR,
+ "OK::::: full_min: %u total_bytes_diff: %u
total_bytes_full_remote_send_first:%u total_bytes_full_local_send_first:%u\n",
+ full_min,
+ total_bytes_diff,
+ total_bytes_full_remote_send_first,
+ total_bytes_full_local_send_first);
+
if (full_min < total_bytes_diff) {
/* Decide between sending all element first or receiving all elements
*/
if(total_bytes_full_remote_send_first >
total_bytes_full_local_send_first) {
@@ -1772,19 +1785,15 @@ handle_union_p2p_strata_estimator (void *cls,
uint8_t mode_of_operation = estimate_best_mode_of_operation(32,
-
op->local_element_count,
+
GNUNET_CONTAINER_multihashmap_size (
+
op->set->content->elements),
op->remote_element_count,
diff_local,
diff_remote,
-
op->rtt_bandwidth_tradeoff,
+ 0,
op->ibf_bucket_number_factor);
-
- /**
- if (diff > 200)
- diff = diff * 3 / 2;
-**/
strata_estimator_destroy (remote_se);
strata_estimator_destroy (op->se);
op->se = NULL;
@@ -1819,10 +1828,10 @@ handle_union_p2p_strata_estimator (void *cls,
* Added rtt_bandwidth_tradeoff directly need future improvements
*/
if ((GNUNET_YES == op->force_full) ||
- (diff > op->initial_size * op->max_set_diff_factor_diff_sync) ||
+ ( mode_of_operation != DIFFERENTIAL_SYNC) ||
(0 == other_size))
{
- LOG (GNUNET_ERROR_TYPE_DEBUG,
+ LOG (GNUNET_ERROR_TYPE_ERROR,
"Deciding to go for full set transmission (diff=%d, own set=%llu)\n",
diff,
(unsigned long long) op->initial_size);
@@ -1830,16 +1839,18 @@ handle_union_p2p_strata_estimator (void *cls,
"# of full sends",
1,
GNUNET_NO);
- if ((op->initial_size <= other_size) ||
+ if ((mode_of_operation == FULL_SYNC_LOCAL_SENDING_FIRST) ||
(0 == other_size))
{
+ LOG (GNUNET_ERROR_TYPE_ERROR,
+ "SENDING OWN SET\n");
send_full_set (op);
}
else
{
struct GNUNET_MQ_Envelope *ev;
- LOG (GNUNET_ERROR_TYPE_DEBUG,
+ LOG (GNUNET_ERROR_TYPE_ERROR,
"Telling other peer that we expect its full set\n");
op->phase = PHASE_FULL_RECEIVING;
perf_rtt.request_full.sent += 1;
@@ -1851,6 +1862,8 @@ handle_union_p2p_strata_estimator (void *cls,
}
else
{
+ LOG (GNUNET_ERROR_TYPE_ERROR,
+ "DIFFERENTIAL\n");
GNUNET_STATISTICS_update (_GSS_statistics,
"# of ibf sends",
1,
diff --git a/src/setu/perf_setu_api.c b/src/setu/perf_setu_api.c
index 73cfdd617..a3df3d157 100644
--- a/src/setu/perf_setu_api.c
+++ b/src/setu/perf_setu_api.c
@@ -404,7 +404,7 @@ run (void *cls,
"Running real set-reconciliation\n");
//init_set1 ();
// limit ~23800 element total
- initRandomSets(4500, 5000,5000,32);
+ initRandomSets(0, 500,500,32);
}
void perf_thread() {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnunet] 52/164: Try something, (continued)
- [gnunet] 52/164: Try something, gnunet, 2021/07/30
- [gnunet] 61/164: Simulation, gnunet, 2021/07/30
- [gnunet] 73/164: Performance chech, gnunet, 2021/07/30
- [gnunet] 85/164: Perf test, gnunet, 2021/07/30
- [gnunet] 89/164: Perftest, gnunet, 2021/07/30
- [gnunet] 75/164: Final messurement, gnunet, 2021/07/30
- [gnunet] 74/164: Add new algo to determinate mode of operation, gnunet, 2021/07/30
- [gnunet] 95/164: Perftest, gnunet, 2021/07/30
- [gnunet] 98/164: Perftest, gnunet, 2021/07/30
- [gnunet] 101/164: Added element avg calculation, gnunet, 2021/07/30
- [gnunet] 77/164: Added new algo to determine operation mode,
gnunet <=
- [gnunet] 81/164: Perf test, gnunet, 2021/07/30
- [gnunet] 87/164: Perf test, gnunet, 2021/07/30
- [gnunet] 100/164: Added message flow control, gnunet, 2021/07/30
- [gnunet] 108/164: Added some more sec checks, gnunet, 2021/07/30
- [gnunet] 93/164: Perftest, gnunet, 2021/07/30
- [gnunet] 94/164: Perftest, gnunet, 2021/07/30
- [gnunet] 86/164: Perf test, gnunet, 2021/07/30
- [gnunet] 20/164: Run over night, gnunet, 2021/07/30
- [gnunet] 53/164: Reverte change to changes salt, gnunet, 2021/07/30
- [gnunet] 46/164: Test data 50 elements, gnunet, 2021/07/30