WIP try to improve Donar
This commit is contained in:
parent
3c7334daff
commit
b2fb6296a1
5 changed files with 23 additions and 16 deletions
|
@ -3,7 +3,7 @@ library(sqldf)
|
||||||
library(plyr)
|
library(plyr)
|
||||||
library(cowplot)
|
library(cowplot)
|
||||||
|
|
||||||
thunder_ms <- read.csv("thunder_configure_13.csv")
|
thunder_ms <- read.csv("thunder_configure_14.csv")
|
||||||
|
|
||||||
thunder_ms <- sqldf("select run,jmax,links,latency, CAST(latency as real) / 1000. as lat_ms from thunder_ms")
|
thunder_ms <- sqldf("select run,jmax,links,latency, CAST(latency as real) / 1000. as lat_ms from thunder_ms")
|
||||||
thunder_ms$links <- as.factor(thunder_ms$links)
|
thunder_ms$links <- as.factor(thunder_ms$links)
|
||||||
|
@ -13,9 +13,9 @@ v1 <- ggplot(data = thunder_ms, aes(x = jmax, y=lat_ms, fill=links)) +
|
||||||
geom_violin() +
|
geom_violin() +
|
||||||
geom_hline(yintercept=800, color = "red", linetype="dashed") +
|
geom_hline(yintercept=800, color = "red", linetype="dashed") +
|
||||||
geom_hline(yintercept=400, color = "DarkGreen") +
|
geom_hline(yintercept=400, color = "DarkGreen") +
|
||||||
annotate("text", x=8, y=550, label= "high", color="DarkGreen") +
|
annotate("text", x=6, y=550, label= "high", color="DarkGreen") +
|
||||||
annotate("text", x=7.7, y=1000, label= "acceptable", color="red") +
|
annotate("text", x=5.7, y=1000, label= "acceptable", color="red") +
|
||||||
coord_cartesian(xlim = c(1, 8)) +
|
coord_cartesian(xlim = c(1, 6)) +
|
||||||
scale_fill_grey() +
|
scale_fill_grey() +
|
||||||
#scale_y_log10() +
|
#scale_y_log10() +
|
||||||
ylab("latency (ms)") +
|
ylab("latency (ms)") +
|
||||||
|
@ -35,7 +35,7 @@ v2 <- ggplot(data = thunder_rcv, aes(x = jmax, y=dlv, fill=links)) +
|
||||||
xlab("max allowed jitter") +
|
xlab("max allowed jitter") +
|
||||||
theme_classic()
|
theme_classic()
|
||||||
|
|
||||||
thunder_bw <- read.csv("thunder_configure_13_bw.csv")
|
thunder_bw <- read.csv("thunder_configure_14_bw.csv")
|
||||||
thunder_bw <- sqldf("select run,jmax,links,udp_sent,udp_rcv,cells_sent,cells_rcv,1.0*cells_sent/udp_sent as sent_ratio,1.0*cells_rcv/udp_rcv as rcv_ratio from thunder_bw where udp_sent > 4000")
|
thunder_bw <- sqldf("select run,jmax,links,udp_sent,udp_rcv,cells_sent,cells_rcv,1.0*cells_sent/udp_sent as sent_ratio,1.0*cells_rcv/udp_rcv as rcv_ratio from thunder_bw where udp_sent > 4000")
|
||||||
thunder_bw$jmax <- as.factor(thunder_bw$jmax)
|
thunder_bw$jmax <- as.factor(thunder_bw$jmax)
|
||||||
thunder_bw$links <- as.factor(thunder_bw$links)
|
thunder_bw$links <- as.factor(thunder_bw$links)
|
||||||
|
@ -53,7 +53,7 @@ v3 <- ggplot(data = thunder_bw, aes(x = jmax, y=sent_ratio, fill=links)) +
|
||||||
t1 <- plot_grid(v1, v2, v3, labels = c('A', 'B', 'C'), ncol=1)
|
t1 <- plot_grid(v1, v2, v3, labels = c('A', 'B', 'C'), ncol=1)
|
||||||
t1 + ggsave("thunder_configure.png", dpi=300, dev='png', height=15, width=15, units="cm")
|
t1 + ggsave("thunder_configure.png", dpi=300, dev='png', height=15, width=15, units="cm")
|
||||||
|
|
||||||
thunder_links <- read.csv("thunder_configure_13_links.csv")
|
thunder_links <- read.csv("thunder_configure_14_links.csv")
|
||||||
links_down_at_least_once <- sqldf("select run,xp_time,link_id, COUNT(status) as downcount, SUM(delta) as elapsed from thunder_links where status='down' group by run,link_id,xp_time")
|
links_down_at_least_once <- sqldf("select run,xp_time,link_id, COUNT(status) as downcount, SUM(delta) as elapsed from thunder_links where status='down' group by run,link_id,xp_time")
|
||||||
links_down_at_least_once2 <- sqldf("select row_number () OVER (PARTITION BY run ORDER BY elapsed DESC) sorting,run,link_id,downcount,elapsed,xp_time,1.0*elapsed/xp_time down_ratio from links_down_at_least_once")
|
links_down_at_least_once2 <- sqldf("select row_number () OVER (PARTITION BY run ORDER BY elapsed DESC) sorting,run,link_id,downcount,elapsed,xp_time,1.0*elapsed/xp_time down_ratio from links_down_at_least_once")
|
||||||
links_down_at_least_once2$sorting <- as.factor(links_down_at_least_once2$sorting)
|
links_down_at_least_once2$sorting <- as.factor(links_down_at_least_once2$sorting)
|
||||||
|
@ -83,7 +83,7 @@ where will_change='True'
|
||||||
v5 <- ggplot(data = downtime, aes(x=sorting, y=dur)) +
|
v5 <- ggplot(data = downtime, aes(x=sorting, y=dur)) +
|
||||||
geom_violin() +
|
geom_violin() +
|
||||||
scale_y_log10() +
|
scale_y_log10() +
|
||||||
ylab("Downtime duration (in sec)") +
|
ylab("Downtime (in sec)") +
|
||||||
xlab("Sorted links") +
|
xlab("Sorted links") +
|
||||||
theme_classic()
|
theme_classic()
|
||||||
|
|
||||||
|
@ -120,12 +120,12 @@ downtime_group$down_link_count <- as.factor(downtime_group$down_link_count)
|
||||||
v7 <- ggplot(data = downtime_group, aes(x=down_link_count, y=dur)) +
|
v7 <- ggplot(data = downtime_group, aes(x=down_link_count, y=dur)) +
|
||||||
geom_violin() +
|
geom_violin() +
|
||||||
scale_y_log10() +
|
scale_y_log10() +
|
||||||
ylab("Downtime duration (in sec)") +
|
ylab("Downtime (in sec)") +
|
||||||
xlab("Number of links down at once") +
|
xlab("Number of links down at once") +
|
||||||
theme_classic()
|
theme_classic()
|
||||||
|
|
||||||
t2 <- plot_grid(v4, v5, v6, v7, labels = c('A', 'B', 'C', 'D'), ncol=2)
|
t2 <- plot_grid(v4, v5, v6, v7, labels = c('A', 'B', 'C', 'D'), ncol=2)
|
||||||
t2 + ggsave("thunder_links.png", dpi=300, dev='png', height=15, width=15, units="cm")
|
t2 + ggsave("thunder_links.png", dpi=300, dev='png', height=12, width=15, units="cm")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -314,15 +314,15 @@ thunder_configure_2_full:
|
||||||
|
|
||||||
thunder_configure_2_full_parse:
|
thunder_configure_2_full_parse:
|
||||||
@. parse_lib.sh && \
|
@. parse_lib.sh && \
|
||||||
parse_thunder thunder_configure_2 27
|
parse_thunder thunder_configure_2 19
|
||||||
|
|
||||||
thunder_configure_2_full_parse_bw:
|
thunder_configure_2_full_parse_bw:
|
||||||
@. parse_lib.sh && \
|
@. parse_lib.sh && \
|
||||||
parse_thunder_bw thunder_configure_2 27
|
parse_thunder_bw thunder_configure_2 19
|
||||||
|
|
||||||
thunder_configure_2_full_parse_links:
|
thunder_configure_2_full_parse_links:
|
||||||
@. parse_lib.sh && \
|
@. parse_lib.sh && \
|
||||||
parse_thunder_links thunder_configure_2 27
|
parse_thunder_links thunder_configure_2 19
|
||||||
|
|
||||||
tor_just_many_latencies:
|
tor_just_many_latencies:
|
||||||
./run-3 \
|
./run-3 \
|
||||||
|
|
|
@ -101,6 +101,7 @@ int schedule(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo, struct bu
|
||||||
to_fdinfo = NULL;
|
to_fdinfo = NULL;
|
||||||
do {
|
do {
|
||||||
thunderc->selected_link = (thunderc->selected_link + 1) % thunderc->total_links;
|
thunderc->selected_link = (thunderc->selected_link + 1) % thunderc->total_links;
|
||||||
|
thunderc->to_increment[thunderc->selected_link]++;
|
||||||
sprintf(url, "tcp:write:127.0.0.1:%d", 7500 + thunderc->selected_link);
|
sprintf(url, "tcp:write:127.0.0.1:%d", 7500 + thunderc->selected_link);
|
||||||
to_fdinfo = evt_core_get_from_url (ctx, url);
|
to_fdinfo = evt_core_get_from_url (ctx, url);
|
||||||
} while (to_fdinfo == NULL && --protect2 >= 0);
|
} while (to_fdinfo == NULL && --protect2 >= 0);
|
||||||
|
@ -109,6 +110,9 @@ int schedule(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo, struct bu
|
||||||
goto schedule_release;
|
goto schedule_release;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We let some time for blacklisted links to recover
|
||||||
|
if (is_blacklisted (thunderc, thunderc->selected_link) && thunderc->to_increment[thunderc->selected_link] < 10) continue;
|
||||||
|
|
||||||
//printf("URL %s has been retained\n", url);
|
//printf("URL %s has been retained\n", url);
|
||||||
|
|
||||||
// 2. We create the packet template
|
// 2. We create the packet template
|
||||||
|
@ -116,8 +120,10 @@ int schedule(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo, struct bu
|
||||||
.fmt.headers.cmd = CMD_LINK_MONITORING_THUNDER,
|
.fmt.headers.cmd = CMD_LINK_MONITORING_THUNDER,
|
||||||
.fmt.headers.size = thunderc->monit_pkt_size,
|
.fmt.headers.size = thunderc->monit_pkt_size,
|
||||||
.fmt.headers.flags = 0,
|
.fmt.headers.flags = 0,
|
||||||
|
.fmt.content.link_monitoring_thunder.to_increment = thunderc->to_increment[thunderc->selected_link],
|
||||||
.fmt.content.link_monitoring_thunder.links_status = {}
|
.fmt.content.link_monitoring_thunder.links_status = {}
|
||||||
};
|
};
|
||||||
|
thunderc->to_increment[thunderc->selected_link] = 0;
|
||||||
|
|
||||||
// 3. We append the template to the buffer
|
// 3. We append the template to the buffer
|
||||||
struct buffer_packet* bp_dup = dup_buffer_tow (&app_ctx->br, bp, to_fdinfo);
|
struct buffer_packet* bp_dup = dup_buffer_tow (&app_ctx->br, bp, to_fdinfo);
|
||||||
|
@ -218,7 +224,7 @@ void classify(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo, struct b
|
||||||
|
|
||||||
// 1. Update link info
|
// 1. Update link info
|
||||||
int link_id = url_get_port_int(fdinfo->url) - 7500;
|
int link_id = url_get_port_int(fdinfo->url) - 7500;
|
||||||
thunderc->received_pkts_on_link[link_id]++;
|
thunderc->received_pkts_on_link[link_id] += ap->fmt.content.link_monitoring_thunder.to_increment;
|
||||||
//printf("Received %ld packets on link %d\n", thunderc->received_pkts_on_link[link_id], link_id);
|
//printf("Received %ld packets on link %d\n", thunderc->received_pkts_on_link[link_id], link_id);
|
||||||
struct link_info *li = &ap->fmt.content.link_monitoring_thunder.links_status;
|
struct link_info *li = &ap->fmt.content.link_monitoring_thunder.links_status;
|
||||||
|
|
||||||
|
@ -407,9 +413,8 @@ void adapt(struct evt_core_ctx* ctx, struct evt_core_fdinfo* fdinfo, struct buff
|
||||||
delivered++;
|
delivered++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (delivered != 1) {
|
|
||||||
//printf("[algo_thunder] Delivered %ld packets (now id=%d)\n", delivered, thunderc->recv_id);
|
printf("[algo_thunder] Delivered %ld packets (now id=%d)\n", delivered, thunderc->recv_id);
|
||||||
}
|
|
||||||
|
|
||||||
mv_buffer_rtof (&app_ctx->br, fdinfo);
|
mv_buffer_rtof (&app_ctx->br, fdinfo);
|
||||||
if (ctx->verbose > 1) fprintf(stderr, " [algo_thunder] Adapt done\n");
|
if (ctx->verbose > 1) fprintf(stderr, " [algo_thunder] Adapt done\n");
|
||||||
|
|
|
@ -57,6 +57,7 @@ union abstract_packet {
|
||||||
|
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
|
uint8_t to_increment;
|
||||||
struct link_info links_status;
|
struct link_info links_status;
|
||||||
} link_monitoring_thunder;
|
} link_monitoring_thunder;
|
||||||
struct {
|
struct {
|
||||||
|
|
|
@ -105,6 +105,7 @@ struct thunder_ctx {
|
||||||
uint16_t emit_id;
|
uint16_t emit_id;
|
||||||
uint8_t selected_link;
|
uint8_t selected_link;
|
||||||
uint8_t total_links;
|
uint8_t total_links;
|
||||||
|
uint8_t to_increment[MAX_LINKS];
|
||||||
uint64_t delta_t_per_link[MAX_LINKS];
|
uint64_t delta_t_per_link[MAX_LINKS];
|
||||||
uint64_t rcv_delta_t_per_link[MAX_LINKS];
|
uint64_t rcv_delta_t_per_link[MAX_LINKS];
|
||||||
uint64_t received_pkts_on_link[MAX_LINKS];
|
uint64_t received_pkts_on_link[MAX_LINKS];
|
||||||
|
|
Loading…
Reference in a new issue