Try   HackMD

效能測試 - Plot time consumpsion of do_request function

tags: linux2020 web server

步驟

  1. 分別對兩種 web server 丟出十萬次 request,每一千筆取樣一次(共100次)分別存到 uring.txtepoll.txt
  2. 透過腳本繪圖: $ gnuplot plot.gp
  3. 檢視圖片: $ eog performance.png

Plot script plot.gp

set term png font "Verdana, 12"
set title "Time consumpsion of do\\_request func.'
set xlabel "experiment"
set ylabel "time (sec)"
set output "performance.png"
set xtic 10
set ytic 0.01

plot [:][:0.25] "uring.txt" using 1:2 with points title 'io\_uring', \
"epoll.txt" using 1:2 with points title 'epoll'

uring.txt

1 0.232697
2 0.021458
3 0.021219
4 0.020742
5 0.020981
6 0.028133
7 0.027657
8 0.029802
9 0.020742
10 0.021458
11 0.028849
12 0.021219
13 0.028133
14 0.021219
15 0.020981
16 0.028610
17 0.020266
18 0.020504
19 0.019550
20 0.019312
21 0.021458
22 0.021935
23 0.021696
24 0.027657
25 0.027180
26 0.020981
27 0.021458
28 0.020981
29 0.022411
30 0.028372
31 0.028133
32 0.027895
33 0.021219
34 0.022888
35 0.027895
36 0.019789
37 0.022411

epoll.txt

1 0.035048
2 0.033617
3 0.036001
4 0.034571
5 0.032425
6 0.033379
9 0.033617
10 0.034094
11 0.034571
12 0.027657
13 0.033379
14 0.037432
15 0.032663
16 0.034094
17 0.027895
18 0.034809
19 0.027180
20 0.035048
21 0.031471
22 0.034332