Révision cb81debf
/dev/null | ||
---|---|---|
1 |
Scenarios,Driver,API,API+1 req/s |
|
2 |
IPMI cards signed,27,16,20 |
|
3 |
PDUs signed,26,16,20 |
|
4 |
IPMI cards unsigned,20,12,16 |
|
5 |
PDUs unsigned,11,9,13 |
b/papers/2014/kwapi/experiments/data/cpu_usage_api.txt | ||
---|---|---|
1 |
Scenarios,Driver,API,API+1 req/s |
|
2 |
IPMI cards signed,27,16,20 |
|
3 |
PDUs signed,26,16,20 |
|
4 |
IPMI cards unsigned,20,12,16 |
|
5 |
PDUs unsigned,11,9,13 |
b/papers/2014/kwapi/experiments/src/python/lib/graph.py | ||
---|---|---|
84 | 84 |
# plt.show() |
85 | 85 |
plt.savefig(output_dir + '/cpu_usage_driver.pdf') |
86 | 86 |
|
87 |
def api_graph(input_dir, output_dir): |
|
88 |
print("Creating API CPU usage graph...") |
|
89 |
|
|
90 |
inf = open(input_dir + '/cpu_usage_api.txt', 'r') |
|
91 |
lines = inf.readlines() |
|
92 |
inf.close() |
|
93 |
|
|
94 |
figure(figsize=(7, 4)) |
|
95 |
ax = plt.subplot(111) |
|
96 |
# fig, ax = plt.subplots() |
|
97 |
|
|
98 |
width = 0.35 # the width of the bars |
|
99 |
first_line = True |
|
100 |
count = 0 |
|
101 |
api = [] |
|
102 |
apireq = [] |
|
103 |
xticks = [] |
|
104 |
for line in lines: |
|
105 |
elems = line.split(',') |
|
106 |
if first_line: |
|
107 |
first_line = False |
|
108 |
continue |
|
109 |
|
|
110 |
xticks.append(elems[0]) |
|
111 |
api.append(int(elems[1])) |
|
112 |
apireq.append(int(elems[2])) |
|
113 |
|
|
114 |
opacity = 0.5 |
|
115 |
N = 4 |
|
116 |
ind = [float(0),float(2),float(4),float(6)] |
|
117 |
ind2 = [float(0.8),float(2.8),float(4.8),float(6.8)] |
|
118 |
indt = [float(0.8),float(2.8),float(4.8),float(6.8)] |
|
119 |
#print ind + width |
|
120 |
colors = ['r','b','g','y'] |
|
121 |
# bars = ax.bar(ind + width / 2, values, width=width, color=colors, alpha=opacity) |
|
122 |
bars_api = ax.barh(ind, api, color='r', alpha=opacity) |
|
123 |
bars_apireq = ax.barh(ind2, apireq, color='b', alpha=opacity) |
|
124 |
plt.yticks(indt, ('IPMI cards\nsigned', 'PDUs\nsigned', 'IPMI cards\nunsigned', 'PDUs\nunsigned')) |
|
125 |
|
|
126 |
# colors = np.linspace(0, 1, len(bars)) |
|
127 |
|
|
128 |
# for bar in bars: |
|
129 |
|
|
130 |
# plt.tick_params( |
|
131 |
# axis='y', # changes apply to the y-axis |
|
132 |
# which='both', # both major and minor ticks are affected |
|
133 |
# bottom='off', # ticks along the bottom edge are off |
|
134 |
# top='off', # ticks along the top edge are off |
|
135 |
# labelbottom='off') # labels along the bottom edge are off |
|
136 |
|
|
137 |
# plt.ylabel('Scenarios') |
|
138 |
plt.xlabel('CPU Usage (\%)') |
|
139 |
# plt.title('CPU Usage of Drivers Under Different Scenarios') |
|
140 |
plt.legend((bars_api, bars_apireq), ['REST API only', 'REST API + 1 req./s']) |
|
141 |
|
|
142 |
plt.tight_layout() |
|
143 |
#plt.show() |
|
144 |
plt.savefig(output_dir + '/cpu_usage_api.pdf') |
|
145 |
|
|
87 | 146 |
def network_graph(input_dir, output_dir): |
88 | 147 |
print("Creating network usage graph...") |
89 | 148 |
|
... | ... | |
218 | 277 |
def plot_graphs(): |
219 | 278 |
args = parse_arguments() |
220 | 279 |
print("Creating the graphs...") |
221 |
cpu_graph(args.input_dir, args.output_dir) |
|
280 |
#cpu_graph(args.input_dir, args.output_dir) |
|
281 |
api_graph(args.input_dir, args.output_dir) |
|
222 | 282 |
#network_graph(args.input_dir, args.output_dir) |
223 | 283 |
# throughput_graph(args.input_dir, args.output_dir) |
b/papers/2014/kwapi/paper.tex | ||
---|---|---|
276 | 276 |
\label{fig:cpu_usage} |
277 | 277 |
\end{figure} |
278 | 278 |
|
279 |
We also evaluated the CPU consumption of the REST API data consumer under the scenarios described in Table \ref{tab:parameters_usage}. In addition to these scenarios, two conditions were assessed, namely (i) the REST API working as a consumer requesting data from drivers at a one-second time interval (REST API only); and (ii) the API requesting data at one-second interval and also answering a call every second to provide the collected data to an external system (REST API + 1 req/s). Figure \ref{fig:cpu_usage_consumer} summarises the obtained results. The CPU consumption is in general low, and even when message signing is enabled and the API serves a query, its consumption is below 20\%. The small variation between the scenarios without message signing is caused by the manner ZeroMQ accumulates data on nodes prior to transmission. |
|
280 |
|
|
281 |
\begin{figure}[!ht] |
|
282 |
\center |
|
283 |
\includegraphics[width=1.\columnwidth]{figs/cpu_usage_api.pdf} |
|
284 |
\caption{API consumer CPU usage under the evaluated scenarios.} |
|
285 |
\label{fig:cpu_usage_consumer} |
|
286 |
\end{figure} |
|
287 |
|
|
279 | 288 |
Although the CPU usage often depends on the drivers, data consumers, and their complexity, and whether message signature is enabled, the experiments show that a large number of probes can be managed by a single machine. In our environment, a management machine per site is more than enough to accommodate the users' monitoring needs. The drivers and API can reuse a machine that already serves other monitoring purposes. |
280 | 289 |
|
281 | 290 |
\begin{figure}[!ht] |
Formats disponibles : Unified diff