Пример #1
0
def plotBurstlenUsec(directory):
    # Read burst lengths from the sniffer pickled files
    burstlen_nsec_pfile = os.path.join(directory, "pickled/burstlen_nsec.txt")
    burstlen_nsec_summary_pfile = os.path.join(directory, "pickled/burstlen_nsec_summary.txt")
    burstlen_nsec = readPickledFile(burstlen_nsec_pfile)
    summary = readPickledFile(burstlen_nsec_summary_pfile)
    ports = summary.keys()

    cdf_data = []
    avg_data = []
    pc99_data = []

    for port in ports:
        # Convert from nanoseconds to microseconds for plotting
        cdf_data.append(map(lambda x: x / 1000.0, burstlen_nsec[port]))
        avg, pc99 = summary[port]
        avg_data.append(avg / 1000.0)
        pc99_data.append(pc99 / 1000.0)

    return plotCDFGraphSimple(
        cdf_data,
        avg_data,
        pc99_data,
        "Burst length (in microseconds)",
        "Fractiles",
        "CDF of burst length in microseconds",
    )
Пример #2
0
def plotMcperfLatency(directory):
    # Read latency histogram from the mcperf pickled files
    mcperf_pfile = os.path.join(directory, 'pickled/mcperf_p.txt')
    mcperf_summary_pfile = os.path.join(directory,
                                        'pickled/mcperf_summary_p.txt')
    agg_hist = readPickledFile(mcperf_pfile)
    mcperf_summary = readPickledFile(mcperf_summary_pfile)

    return plotCDFGraphFromHist(agg_hist, mcperf_summary['lat_avg'],
                                mcperf_summary['lat_pc99'],
                                mcperf_summary['lat_pc999'],
                                "Memcached transaction latency (usecs)",
                                "Fractiles",
                                "CDF of memcached transaction latency")
def plotMcperfLatency(directory):
    # Read latency histogram from the mcperf pickled files
    mcperf_pfile = os.path.join(directory, 'pickled/mcperf_p.txt')
    mcperf_summary_pfile = os.path.join(
            directory, 'pickled/mcperf_summary_p.txt')
    agg_hist = readPickledFile(mcperf_pfile)
    mcperf_summary = readPickledFile(mcperf_summary_pfile)

    return plotCDFGraphFromHist(agg_hist, mcperf_summary['lat_avg'],
                                mcperf_summary['lat_pc99'],
                                mcperf_summary['lat_pc999'],
                                "Memcached transaction latency (usecs)",
                                "Fractiles",
                                "CDF of memcached transaction latency")
Пример #4
0
def plotIpt(directory):
    # Read inter-packet arrival times from the sniffer pickled files
    ipt_pfile = os.path.join(directory, "pickled/ipt.txt")
    ipt_summary_pfile = os.path.join(directory, "pickled/ipt_summary.txt")
    ipt = readPickledFile(ipt_pfile)
    summary = readPickledFile(ipt_summary_pfile)
    ports = summary.keys()

    # Read packet lengths from sniffer pickled files
    pkt_len_freq_pfile = os.path.join(directory, "pickled/pkt_len_freq.txt")
    (most_freq_pkt_len, pkt_len_freq) = readPickledFile(pkt_len_freq_pfile)

    cdf_data = []
    avg_data = []
    pc99_data = []

    for port in ports:
        # Convert from nanoseconds to microseconds for plotting
        cdf_data.append(map(lambda x: x / 1000.0, ipt[port]))
        avg, pc99 = summary[port]
        avg_data.append(avg / 1000.0)
        pc99_data.append(pc99 / 1000.0)

    # Generate CDF plot
    plot = plotCDFGraphSimple(
        cdf_data,
        avg_data,
        pc99_data,
        "Inter-packet time (in microseconds)",
        "Fractiles",
        "CDF of inter-packet time (not inter-packet gap) " "in microseconds",
    )

    # Compute ideal inter-packet arrival time for most frequently seen packet
    # length in the trace
    rate_mbps = float(readDirTagFileProperty(directory, "rate_mbps"))
    nclasses = int(readDirTagFileProperty(directory, "nclasses"))
    rate_per_class_gbps = rate_mbps / (1000.0 * nclasses)
    ideal_nsec = idealIptNsec(most_freq_pkt_len, rate_per_class_gbps)

    # Add VLine for the ideal inter-packet time
    # Also convert from nanoseconds to microseconds for plotting
    ideal_vline = boomslang.VLine(color="magenta", lineStyle="-.", width=2)
    ideal_vline.xValues = [ideal_nsec / 1000.0]
    ideal_vline.label = "Ideal"
    plot.add(ideal_vline)

    return plot
Пример #5
0
def getAvgBurstLenPkt(directory):
    # Read the sniffer pickle file and return the average burst length in
    # packets
    burstlen_pkt_summary_pfile = os.path.join(
            directory, 'pickled/burstlen_pkt_summary.txt')
    summary = readPickledFile(burstlen_pkt_summary_pfile)
    avg_burstlen = numpy.average(map(lambda port: summary[port][0],
                                     summary.keys()))
    return avg_burstlen
Пример #6
0
def getAvgBurstLenPkt(directory):
    # Read the sniffer pickle file and return the average burst length in
    # packets
    burstlen_pkt_summary_pfile = os.path.join(
        directory, 'pickled/burstlen_pkt_summary.txt')
    summary = readPickledFile(burstlen_pkt_summary_pfile)
    avg_burstlen = numpy.average(
        map(lambda port: summary[port][0], summary.keys()))
    return avg_burstlen
Пример #7
0
def getPc99BurstLenUsec(directory):
    # Read the sniffer pickle file and return the average of pc99 burst length
    # in usecs (convert from nsecs)
    burstlen_nsec_summary_pfile = os.path.join(
            directory, 'pickled/burstlen_nsec_summary.txt')
    summary = readPickledFile(burstlen_nsec_summary_pfile)
    avg_pc99_burstlen = (numpy.average(map(lambda port: summary[port][1],
                                           summary.keys())) / 1000.0)
    return avg_pc99_burstlen
Пример #8
0
def plotIpt(directory):
    # Read inter-packet arrival times from the sniffer pickled files
    ipt_pfile = os.path.join(directory, 'pickled/ipt.txt')
    ipt_summary_pfile = os.path.join(directory, 'pickled/ipt_summary.txt')
    ipt = readPickledFile(ipt_pfile)
    summary = readPickledFile(ipt_summary_pfile)
    ports = summary.keys()

    # Read packet lengths from sniffer pickled files
    pkt_len_freq_pfile = os.path.join(directory, 'pickled/pkt_len_freq.txt')
    (most_freq_pkt_len, pkt_len_freq) = readPickledFile(pkt_len_freq_pfile)

    cdf_data = []
    avg_data = []
    pc99_data = []

    for port in ports:
        # Convert from nanoseconds to microseconds for plotting
        cdf_data.append(map(lambda x: x / 1000.0, ipt[port]))
        avg, pc99 = summary[port]
        avg_data.append(avg / 1000.0)
        pc99_data.append(pc99 / 1000.0)

    # Generate CDF plot
    plot = plotCDFGraphSimple(
        cdf_data, avg_data, pc99_data, "Inter-packet time (in microseconds)",
        "Fractiles", "CDF of inter-packet time (not inter-packet gap) "
        "in microseconds")

    # Compute ideal inter-packet arrival time for most frequently seen packet
    # length in the trace
    rate_mbps = float(readDirTagFileProperty(directory, "rate_mbps"))
    nclasses = int(readDirTagFileProperty(directory, "nclasses"))
    rate_per_class_gbps = rate_mbps / (1000.0 * nclasses)
    ideal_nsec = idealIptNsec(most_freq_pkt_len, rate_per_class_gbps)

    # Add VLine for the ideal inter-packet time
    # Also convert from nanoseconds to microseconds for plotting
    ideal_vline = boomslang.VLine(color="magenta", lineStyle="-.", width=2)
    ideal_vline.xValues = [ideal_nsec / 1000.0]
    ideal_vline.label = "Ideal"
    plot.add(ideal_vline)

    return plot
Пример #9
0
def getPc99BurstLenUsec(directory):
    # Read the sniffer pickle file and return the average of pc99 burst length
    # in usecs (convert from nsecs)
    burstlen_nsec_summary_pfile = os.path.join(
        directory, 'pickled/burstlen_nsec_summary.txt')
    summary = readPickledFile(burstlen_nsec_summary_pfile)
    avg_pc99_burstlen = (
        numpy.average(map(lambda port: summary[port][1], summary.keys())) /
        1000.0)
    return avg_pc99_burstlen
def getLatencyCDF(directory):
    # Read latency histogram from the mcperf pickled files
    mcperf_pfile = os.path.join(directory, 'pickled/mcperf_p.txt')
    agg_hist = readPickledFile(mcperf_pfile)

    if FOR_PAPER:
        # Convert usec sample values to msec
        agg_hist = {k / 1000.0: v for k, v in agg_hist.items()}

    return cdfLineFromHist(agg_hist)
Пример #11
0
def plotBurstlenPkt(directory):
    # Read burst lengths from the sniffer pickled files
    burstlen_pkt_pfile = os.path.join(directory, "pickled/burstlen_pkt.txt")
    burstlen_pkt_summary_pfile = os.path.join(directory, "pickled/burstlen_pkt_summary.txt")
    burstlen_pkt = readPickledFile(burstlen_pkt_pfile)
    summary = readPickledFile(burstlen_pkt_summary_pfile)
    ports = summary.keys()

    cdf_data = []
    avg_data = []
    pc99_data = []

    for port in ports:
        cdf_data.append(burstlen_pkt[port])
        avg, pc99 = summary[port]
        avg_data.append(avg)
        pc99_data.append(pc99)

    return plotCDFGraphSimple(
        cdf_data, avg_data, pc99_data, "Burst length (in packets)", "Fractiles", "CDF of burst length in packets"
    )
def getServerAvgTxRate(directory):
    # Read the trafgen pickle file and return the average trafgen Tx rate on
    # server machines
    trafgen_pfile = os.path.join(directory, 'pickled/trafgen_p.txt')
    (host_tx_goodput, host_rx_goodput) = readPickledFile(trafgen_pfile)

    # Find the list of servers used for the experiment
    servers, clients = getServersAndClients(directory)

    rates = [ int(host_tx_goodput.get(server, 0) * 1514.0 / 1472.0)
              for server in servers ]

    return numpy.mean(rates)
Пример #13
0
def plotBurstlenPkt(directory):
    # Read burst lengths from the sniffer pickled files
    burstlen_pkt_pfile = os.path.join(directory, 'pickled/burstlen_pkt.txt')
    burstlen_pkt_summary_pfile = os.path.join(
        directory, 'pickled/burstlen_pkt_summary.txt')
    burstlen_pkt = readPickledFile(burstlen_pkt_pfile)
    summary = readPickledFile(burstlen_pkt_summary_pfile)
    ports = summary.keys()

    cdf_data = []
    avg_data = []
    pc99_data = []

    for port in ports:
        cdf_data.append(burstlen_pkt[port])
        avg, pc99 = summary[port]
        avg_data.append(avg)
        pc99_data.append(pc99)

    return plotCDFGraphSimple(cdf_data, avg_data, pc99_data,
                              "Burst length (in packets)", "Fractiles",
                              "CDF of burst length in packets")
Пример #14
0
def plotBurstlenUsec(directory):
    # Read burst lengths from the sniffer pickled files
    burstlen_nsec_pfile = os.path.join(directory, 'pickled/burstlen_nsec.txt')
    burstlen_nsec_summary_pfile = os.path.join(
        directory, 'pickled/burstlen_nsec_summary.txt')
    burstlen_nsec = readPickledFile(burstlen_nsec_pfile)
    summary = readPickledFile(burstlen_nsec_summary_pfile)
    ports = summary.keys()

    cdf_data = []
    avg_data = []
    pc99_data = []

    for port in ports:
        # Convert from nanoseconds to microseconds for plotting
        cdf_data.append(map(lambda x: x / 1000.0, burstlen_nsec[port]))
        avg, pc99 = summary[port]
        avg_data.append(avg / 1000.0)
        pc99_data.append(pc99 / 1000.0)

    return plotCDFGraphSimple(cdf_data, avg_data, pc99_data,
                              "Burst length (in microseconds)", "Fractiles",
                              "CDF of burst length in microseconds")
def getServerAvgTxRate(directory):
    # Read the trafgen pickle file and return the average trafgen Tx rate on
    # server machines
    trafgen_pfile = os.path.join(directory, 'pickled/trafgen_p.txt')
    (host_tx_goodput, host_rx_goodput) = readPickledFile(trafgen_pfile)

    # Find the list of servers used for the experiment
    servers, clients = getServersAndClients(directory)

    rates = [
        int(host_tx_goodput.get(server, 0) * 1514.0 / 1472.0)
        for server in servers
    ]

    return numpy.mean(rates)
Пример #16
0
def getKernelCPUUtil(directory):
    # Read the mpstat pickle file and return the kernel CPU utilization
    mpstat_pfile = os.path.join(directory, 'pickled/mpstat_p.txt')
    (kernel_usage, summary) = readPickledFile(mpstat_pfile)
    return kernel_usage
def getServersAndClients(directory):
    # Read the hosts info pickle file
    hosts_pfile = os.path.join(directory, 'pickled/hosts_p.txt')
    (servers, clients) = readPickledFile(hosts_pfile)
    return (servers, clients)
def getpc999Latency(directory):
    # Read the mcperf pickle file and return the average latency
    mcperf_summary_pfile = os.path.join(
            directory, 'pickled/mcperf_summary_p.txt')
    mcperf_summary = readPickledFile(mcperf_summary_pfile)
    return mcperf_summary['lat_pc999']
Пример #19
0
def getKernelCPUUtil(directory):
    # Read the mpstat pickle file and return the kernel CPU utilization
    mpstat_pfile = os.path.join(directory, 'pickled/mpstat_p.txt')
    (kernel_usage, summary) = readPickledFile(mpstat_pfile)
    return kernel_usage
def getServersAndClients(directory):
    # Read the hosts info pickle file
    hosts_pfile = os.path.join(directory, 'pickled/hosts_p.txt')
    (servers, clients) = readPickledFile(hosts_pfile)
    return (servers, clients)