In [1]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.cm as cm
pd.set_option('display.max_colwidth', 120)
pd_res = pd.read_csv('out/results/parse_res.prof')
BASE_MACHINE_NAME = 'kv7'
def plot_hist(category_name, yscale, xmargin, tick_rotation, xlabel, ylabel, ylim=None):
category = pd_res[pd_res['benchmark'].str.contains(category_name)].sort_values('benchmark')
# recreate a new view with benchmarks with all machines
category_df = pd.DataFrame(data=category['benchmark'], columns=['benchmark'])
machines = category['machine'].unique()
for m in machines:
category_df[m] = category[category['machine'] == m]['result']
category_df[BASE_MACHINE_NAME] = category[category['machine'] == machines[0]]['base_result']
category_df = category_df.reset_index(drop=True)
# start to draw figrue
all_machines = machines.tolist() + [BASE_MACHINE_NAME]
names = category_df['benchmark'].tolist()
values = [category_df[m].tolist() for m in all_machines]
colors = cm.gist_rainbow(np.linspace(0, 1, 5))
pos = np.arange(len(values[0]))
width = 1. / (5 + len(values))
bars = []
fig, ax = plt.subplots()
if ylim is not None:
ax.set_ylim(ylim[0], ylim[1])
for idx, (v, color) in enumerate(zip(values, colors)):
bars.append(ax.bar(left=pos + idx * width, height=v, width=width, alpha=0.7, color=color))
ax.legend([bars[i] for i in range(len(all_machines))], all_machines, loc='center', bbox_to_anchor=(1.3, 0.5))
ax.set_yscale(yscale)
ax.margins(xmargin, None)
ax.set_xticks(pos + width)
ax.set_xticklabels(names, rotation=tick_rotation)
plt.xlabel(xlabel)
plt.ylabel(ylabel)
plt.show()
return category_df
In [2]:
sysbench_cpu_df = plot_hist(category_name='sysbench_cpu', yscale='log',
xmargin=0.1 , tick_rotation='vertical',
xlabel='Maximum prime number', ylabel='Elapsed time (sec)')
sysbench_cpu_df
Out[2]:
Command arguments: memory-block-size=1K, memory-oper=read/write, memory-access-mode=seq/rnd, max-time=300, max-requests=0 num-threads=[1,2,3,4,5]
In [3]:
sysbench_memory_df = plot_hist(category_name='sysbench_memory', yscale='linear',
xmargin=0.1 , tick_rotation='vertical',
xlabel='Operation', ylabel='# of operations (ops/sec)')
sysbench_memory_df
Out[3]:
In [4]:
stress_ng_cpu_df = plot_hist(category_name='stress-ng_cpu', yscale='log',
xmargin=0.05 , tick_rotation='vertical',
xlabel='CPU Module', ylabel='# of operations (ops/sec)')
stress_ng_cpu_df
Out[4]:
In [5]:
stress_ng_memory_df = plot_hist(category_name='stress-ng_memory', yscale='log',
xmargin=0.05 , tick_rotation='vertical',
xlabel='RAM Module', ylabel='# of operations (ops/sec)')
stress_ng_memory_df
Out[5]:
Use direct I/O for data to avoiding the buffer cache, but the drive write-back caching is activated.
Command arguments: --file-num=128 --file-total-size=8G --file-block-size=1048576 --max-time=60 --max-requests=0 --file-test-mode=seqwr --file-extra-flags=direct --file-fsync-end=on --file-fsync-mode=fsync --num-threads=1 run
Defaults arguments:
"direct" for oflag=flag
Use direct I/O for data, avoiding the buffer cache. Note that the kernel may impose restrictions on read or write buffer sizes. For example, with an ext4 destination file system and a Linux-based kernel, using ‘oflag=direct’ will cause writes to fail with EINVAL if the output buffer size is not a multiple of 512.
Original output from kv7
sysbench 1.0: multi-threaded system evaluation benchmark
Running the test with following options:
Number of threads: 44
Initializing random number generator from current time
Extra file open flags: 0
128 files, 800MiB each
100GiB total file size
Block size 1KiB
Number of IO requests: 0
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random write test
Initializing worker threads...
Threads started!
File operations:
reads/s: 0.00
writes/s: 510.89
fsyncs/s: 653.22
Throughput:
read, MiB/s: 0.00
written, MiB/s: 0.50
General statistics:
total time: 60.0915s
total number of events: 30700
total time taken by event execution: 239.9327s
response time:
min: 0.01ms
avg: 7.82ms
max: 192.07ms
approx. 95 percentile: 46.77ms
Threads fairness:
events (avg/stddev): 697.7273/66.06
execution time (avg/stddev): 5.4530/0.58
In [6]:
sysbench_fileio_df = plot_hist(category_name='sysbench_fileio_ssd_run.*?bw.*', yscale='log',
xmargin=0.1 , tick_rotation='vertical',
xlabel='Metrics (# of Events, # of Operations, Bandwidth)', ylabel='')
sysbench_fileio_df
Out[6]:
In [7]:
sysbench_fileio_df = plot_hist(category_name='sysbench_fileio_run.*?bw.*', yscale='log',
xmargin=0.1 , tick_rotation='vertical',
xlabel='Metrics (# of Events, # of Operations, Bandwidth)', ylabel='')
sysbench_fileio_df
Out[7]:
In [8]:
stress_ng_io_df = plot_hist(category_name='stress-ng_io', yscale='log',
xmargin=0.05 , tick_rotation='vertical',
xlabel='I/O Module', ylabel='# of operations (ops/sec)')
stress_ng_io_df
Out[8]:
In [9]:
stress_ng_network_df = plot_hist(category_name='stress-ng_network', yscale='log',
xmargin=0.05 , tick_rotation='vertical',
xlabel='Network Module', ylabel='# of operations (ops/sec)')
stress_ng_network_df
Out[9]:
In [10]:
iperf3_df = plot_hist(category_name='iperf3', yscale='linear',
xmargin=0.05 , tick_rotation='vertical',
xlabel='window size in KByte', ylabel='Bandwidth (Mbits/sec)')
iperf3_df
Out[10]:
Configuration of KV Drive (many of configurations are hidden)
Configuration of issdm-6
10 years old machine
Based on primality test (SysBench) and cpu, cpu-cache benchmarks (stress-ng) using 1 thread.
KV drive is 16 times slower than issdm-6 (1 thread)
Based on SysBench memory functions speed test (compare the peak performance)
Based on SysBench File I/O test (compare the peak performance).
This experiment use direct I/O for data to avoid the buffer cache, but the drive write-back caching is avtivated.
Based on stress-ng network test and iperf3 Network bandwidth performance test
UDP and TCP are almost the same (1 thread).