Exemple #1
0
def syscalls_perf_graph(df: pd.DataFrame) -> Any:
    df2 = df[(df.data_size == 32) & (df.threads == 8)]
    df2 = df2.assign(
        time_per_syscall=10e6 * df2.total_time / (df2.packets_per_thread * df2.threads)
    )
    g = catplot(
        data=apply_aliases(df2),
        x=column_alias("system"),
        y=column_alias("time_per_syscall"),
        order=systems_order(df2),
        kind="bar",
        height=2.5,
        # aspect=1.2,
        color=color,
        palette=None,
    )
    # change_width(g.ax, 0.405)
    # g.ax.set_xlabel("")
    # g.ax.set_ylabel(g.ax.get_ylabel(), fontsize=8)

    # g.ax.set_xticklabels(g.ax.get_xmajorticklabels(), fontsize=8)
    # g.ax.set_yticklabels(g.ax.get_ymajorticklabels(), fontsize=8)
    # g.ax.grid(which="major")
    apply_to_graphs(g.ax, False, -1, 0.28)

    return g
Exemple #2
0
def network_optimization_plot(dir: str, graphs: List[Any]) -> None:
    df_all = read_iperf(
        os.path.join(os.path.realpath(dir), "iperf-all-on-latest.tsv"),
        "offloads+\nzerocopy")

    df_offload = read_iperf(
        os.path.join(os.path.realpath(dir), "iperf-offload_off-latest.tsv"),
        "no offloads")

    df_zcopy = read_iperf(
        os.path.join(os.path.realpath(dir), "iperf-zerocopy_off-latest.tsv"),
        "no zerocopy")
    df = pd.concat([df_all, df_offload, df_zcopy])
    g = catplot(
        data=apply_aliases(df),
        x=column_alias("type"),
        y=column_alias("iperf-throughput"),
        kind="bar",
        height=2.5,
        # aspect=1.2,
        color="black",
        palette=None,
    )
    apply_to_graphs(g.ax, False, -1, 0.18)

    graphs.append(g)
Exemple #3
0
def fio_read_write_graph(df: pd.DataFrame) -> Any:
    df = pd.melt(
        df,
        id_vars=["system", "job"],
        value_vars=["read-bw", "write-bw"],
        var_name="operation",
        value_name="disk-throughput",
    )
    df = df.groupby(["system", "operation"]).sum().reset_index()

    df["disk-throughput"] /= 1024
    g = catplot(
        data=apply_aliases(df),
        x=column_alias("system"),
        y=column_alias("disk-throughput"),
        hue=column_alias("operation"),
        order=systems_order(df),
        kind="bar",
        height=2.5,
        palette=palette,
        legend=False,
        # aspect=1.2,
    )
    # change_width(g.ax, 0.405)

    # g.ax.set_xlabel("")
    # g.ax.legend(loc="center", bbox_to_anchor=(0.5, 1.05), ncol=2, frameon=False)
    apply_to_graphs(g.ax, True, 2, 0.285)
    # g.ax.grid(which="major")
    return g
Exemple #4
0
def mysql_throughput_graph(df: pd.DataFrame) -> Any:
    df = df[["system", "SQL statistics transactions", "General statistics total time"]]
    df["General statistics total time"] = df["General statistics total time"].apply(
        lambda x: float(x.replace("s", ""))
    )
    df["mysql-throughput"] = (
        df["SQL statistics transactions"] / df["General statistics total time"]
    )

    df = apply_aliases(df)

    g = catplot(
        data=df,
        x=column_alias("system"),
        y=column_alias("mysql-throughput"),
        kind="bar",
        height=2.5,
        # aspect=1.2,
        color=color,
        palette=None,
        order=systems_order(df),
    )

    apply_to_graphs(g.ax, False, -1, 0.285)
    return g
Exemple #5
0
def network_bs_plot(dir: str, graphs: List[Any]) -> None:
    df = pd.read_csv(os.path.join(os.path.realpath(dir),
                                  "network-test-bs-latest.tsv"),
                     sep="\t")
    df["network-bs-throughput"] = 1024 / df["time"]
    # df["batch_size"] = df["batch_size"].apply(lambda x: str(x)+"KiB")

    g = catplot(
        data=apply_aliases(df),
        x=column_alias("batch_size"),
        y=column_alias("network-bs-throughput"),
        kind="bar",
        height=2.5,
        legend=False,
        color="black",
        palette=None,
    )

    # change_width(g.ax, 0.25)
    # # g.ax.set_xlabel('')
    # g.ax.set_xticklabels(g.ax.get_xmajorticklabels(), fontsize=6)
    # g.ax.set_yticklabels(g.ax.get_ymajorticklabels(), fontsize=6)
    apply_to_graphs(g.ax, False, -1)

    graphs.append(g)
Exemple #6
0
def smp_plot(dir: str, graphs: List[Any]) -> None:
    df = pd.read_csv(os.path.join(os.path.realpath(dir), "smp-latest.tsv"),
                     sep="\t")
    df = pd.melt(df,
                 id_vars=['cores', 'job'],
                 value_vars=['read-bw', 'write-bw'],
                 var_name="operation",
                 value_name="disk-throughput")
    df = df.groupby(["cores", "operation"]).sum().reset_index()

    df["disk-throughput"] /= 1024
    g = catplot(
        data=apply_aliases(df),
        x=column_alias("cores"),
        y=column_alias("disk-throughput"),
        hue=column_alias("operation"),
        kind="bar",
        height=2.5,
        legend=False,
        palette=["grey", "black"],
    )

    # change_width(g.ax, 0.25)
    # # g.ax.set_xlabel('')
    # g.ax.set_xticklabels(g.ax.get_xmajorticklabels(), fontsize=6)
    # g.ax.set_yticklabels(g.ax.get_ymajorticklabels(), fontsize=6)
    # g.ax.legend(loc='best', fontsize='small')
    apply_to_graphs(g.ax, True, 2, 0.285)

    graphs.append(g)
Exemple #7
0
def hdparm_zerocopy_plot(dir: str, graphs: List[Any]) -> None:
    df_all_on = pd.read_csv(os.path.join(os.path.realpath(dir),
                                         "hdparm-all-on-latest.tsv"),
                            sep="\t")

    df_zcopy_off = pd.read_csv(os.path.join(os.path.realpath(dir),
                                            "hdparm-zerocopy-off-latest.tsv"),
                               sep="\t")

    df_all_on = df_all_on.drop(columns=["system"])
    df_zcopy_off = df_zcopy_off.drop(columns=["system"])

    df_all_on["Timing buffered disk reads"] = preprocess_hdparm(
        df_all_on["Timing buffered disk reads"], )
    df_zcopy_off["Timing buffered disk reads"] = preprocess_hdparm(
        df_zcopy_off["Timing buffered disk reads"], )

    df_all_on["Timing buffer-cache reads"] = preprocess_hdparm(
        df_all_on["Timing buffer-cache reads"], )

    df_zcopy_off["Timing buffer-cache reads"] = preprocess_hdparm(
        df_zcopy_off["Timing buffer-cache reads"], )

    df_all_on = df_all_on.T.reset_index()
    df_zcopy_off = df_zcopy_off.T.reset_index()

    df_zcopy_off.columns = ["hdparm_kind", "hdparm-throughput"]
    df_all_on.columns = ["hdparm_kind", "hdparm-throughput"]

    df_all_on["feature_spdk"] = pd.Series(["spdk-zerocopy"] *
                                          len(df_all_on.index),
                                          index=df_all_on.index)
    df_zcopy_off["feature_spdk"] = pd.Series(["spdk-copy"] *
                                             len(df_zcopy_off.index),
                                             index=df_zcopy_off.index)

    plot_df = pd.concat([df_all_on, df_zcopy_off], axis=0)
    groups = len(set(list(plot_df["feature_spdk"].values)))

    g = catplot(
        data=apply_aliases(plot_df),
        x=column_alias("feature_spdk"),
        y=column_alias("hdparm-throughput"),
        kind="bar",
        height=2.5,
        legend=False,
        hue=column_alias("hdparm_kind"),
        palette=["grey", "black"],
    )

    # apply_hatch(groups, g, True)
    # change_width(g.ax, 0.25)
    # g.ax.set_xlabel("")

    # g.ax.set_xticklabels(g.ax.get_xmajorticklabels(), fontsize=6)
    # g.ax.set_yticklabels(g.ax.get_ymajorticklabels(), fontsize=6)
    apply_to_graphs(g.ax, True, 2)

    graphs.append(g)
Exemple #8
0
def memcpy_graph(df: pd.DataFrame) -> Any:
    g = catplot(
        data=apply_aliases(df),
        x=column_alias("memcpy-size"),
        y=column_alias("memcpy-time"),
        hue=column_alias("memcpy-kind"),
        kind="bar",
        height=2.5,
        aspect=1.2,
    )

    return g
Exemple #9
0
def mysql_latency_graph(df: pd.DataFrame) -> Any:
    groups = len(set((list(df["system"].values))))

    g = catplot(
        data=apply_aliases(df),
        x=column_alias("system"),
        y=column_alias("Latency (ms) avg"),
        kind="bar",
        height=2.5,
        # aspect=1.2,
        color=color,
        palette=None,
        order=systems_order(df),
    )
    apply_to_graphs(g.ax, False, -1, 0.285)
    return g
Exemple #10
0
def spdk_zerocopy_plot(dir: str, graphs: List[Any]) -> None:
    df = pd.read_csv(os.path.join(os.path.realpath(dir),
                                  "spdk-zerocopy-latest.tsv"),
                     sep="\t")
    df = df.assign(aesnithroughput=df.bytes / df.time / 1024 / 1024)
    g = catplot(
        data=apply_aliases(df),
        x=column_alias("type"),
        y=column_alias("aesnithroughput"),
        kind="bar",
        height=2.5,
        aspect=1.2,
    )
    change_width(g.ax, 0.25)
    g.ax.set_xlabel('')
    graphs.append(g)
Exemple #11
0
def aesni_plot(dir: str, graphs: List[Any]) -> None:
    df = pd.read_csv(os.path.join(os.path.realpath(dir), "aesni-latest.tsv"),
                     sep="\t")
    df = df.assign(aesnithroughput=df.bytes / df.time / 1024 / 1024)
    g = catplot(data=apply_aliases(df),
                x=column_alias("type"),
                y=column_alias("aesnithroughput"),
                kind="bar",
                height=2.5,
                aspect=1.2,
                color="black",
                palette=None)
    apply_to_graphs(g.ax, False, -1, 0.1)
    g.ax.set_ylabel(g.ax.get_ylabel(), size=8)
    g.ax.set_xticklabels(g.ax.get_xticklabels(), size=8)
    g.ax.set_yticklabels(g.ax.get_yticklabels(), size=8)
    graphs.append(g)
Exemple #12
0
def iperf_graph(df: pd.DataFrame) -> Any:
    df = df[df["direction"] == "send"]
    df["iperf-throughput"] = df["bytes"] / df["seconds"] * 8 / 1e9

    g = catplot(
        data=apply_aliases(df),
        x=column_alias("system"),
        order=systems_order(df),
        y=column_alias("iperf-throughput"),
        kind="bar",
        height=2.5,
        # aspect=1.2,
        color=color,
        palette=None,
    )
    # change_width(g.ax, 0.405)
    # g.ax.set_xlabel("")

    apply_to_graphs(g.ax, False, -1, 0.285)

    # g.ax.grid(which="major")

    return g
Exemple #13
0
def storage_bs_plot(dir: str, graphs: List[Any]) -> None:
    df = pd.read_csv(os.path.join(os.path.realpath(dir), "simpleio-unenc.tsv"),
                     sep="\t")
    df["storage-bs-throughput"] = (10 * 1024) / df["time"]

    g = catplot(
        data=apply_aliases(df),
        x=column_alias("batch-size"),
        y=column_alias("storage-bs-throughput"),
        kind="bar",
        height=2.5,
        legend=False,
        color="black",
        palette=None,
    )

    # change_width(g.ax, 0.25)
    # # g.ax.set_xlabel('')
    # g.ax.set_xticklabels(g.ax.get_xmajorticklabels(), fontsize=6)
    # g.ax.set_yticklabels(g.ax.get_ymajorticklabels(), fontsize=6)

    apply_to_graphs(g.ax, False, -1)

    graphs.append(g)