diff --git a/.gitignore b/.gitignore index 4029495..e69de29 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +0,0 @@ -/output \ No newline at end of file diff --git a/output/jelena/DEFAULT.csv b/output/jelena/DEFAULT.csv new file mode 100644 index 0000000..596b849 --- /dev/null +++ b/output/jelena/DEFAULT.csv @@ -0,0 +1,9 @@ +name,params,time +thread,100000,1999900 +fork,16,6197448 +read,10000000,6371962 +write,10000000,5714443 +mmap_munmap,10000000 1,17664436 +send,10000000 a,9727562 +recv,,9727900 +page_fault,1000000,1555996 diff --git a/output/jelena/HARDENED_USERCOPY.csv b/output/jelena/HARDENED_USERCOPY.csv new file mode 100644 index 0000000..8c588a3 --- /dev/null +++ b/output/jelena/HARDENED_USERCOPY.csv @@ -0,0 +1,9 @@ +name,params,time +thread,100000,1677421 +fork,16,6563560 +read,10000000,6254080 +write,10000000,5689036 +mmap_munmap,10000000 1,17553058 +send,10000000 a,8348692 +recv,,8348948 +page_fault,1000000,1548909 diff --git a/output/jelena/MEMCG.csv b/output/jelena/MEMCG.csv new file mode 100644 index 0000000..1f3ca8d --- /dev/null +++ b/output/jelena/MEMCG.csv @@ -0,0 +1,9 @@ +name,params,time +thread,100000,1601172 +fork,16,5908047 +read,10000000,6270161 +write,10000000,5642724 +mmap_munmap,10000000 1,17221338 +send,10000000 a,8363540 +recv,,8363796 +page_fault,1000000,1381872 diff --git a/output/jelena/PAGE_TABLE_ISOLATION.csv b/output/jelena/PAGE_TABLE_ISOLATION.csv new file mode 100644 index 0000000..1c3dd2e --- /dev/null +++ b/output/jelena/PAGE_TABLE_ISOLATION.csv @@ -0,0 +1,9 @@ +name,params,time +thread,100000,1591290 +fork,16,6843961 +read,10000000,3859713 +write,10000000,3258447 +mmap_munmap,10000000 1,11476015 +send,10000000 a,5758170 +recv,,5758368 +page_fault,1000000,1304024 diff --git a/output/jelena/RETPOLINE.csv b/output/jelena/RETPOLINE.csv new file mode 100644 index 0000000..cefbce2 --- /dev/null +++ b/output/jelena/RETPOLINE.csv @@ -0,0 +1,9 @@ +name,params,time +thread,100000,1675857 +fork,16,6000988 +read,10000000,5996482 +write,10000000,5337312 +mmap_munmap,10000000 1,16714062 +send,10000000 a,7855332 +recv,,7855747 +page_fault,1000000,1541987 diff --git a/output/jelena/TRANSPARENT_HUGEPAGE_ALWAYS.csv b/output/jelena/TRANSPARENT_HUGEPAGE_ALWAYS.csv new file mode 100644 index 0000000..cb0513f --- /dev/null +++ b/output/jelena/TRANSPARENT_HUGEPAGE_ALWAYS.csv @@ -0,0 +1,9 @@ +name,params,time +thread,100000,1720898 +fork,16,6858277 +read,10000000,6293478 +write,10000000,5667435 +mmap_munmap,10000000 1,17591167 +send,10000000 a,8448935 +recv,,8449256 +page_fault,1000000,1549881 diff --git a/output/jelena/USERFAULTFD.csv b/output/jelena/USERFAULTFD.csv new file mode 100644 index 0000000..ec0eaf1 --- /dev/null +++ b/output/jelena/USERFAULTFD.csv @@ -0,0 +1,9 @@ +name,params,time +thread,100000,1710576 +fork,16,7000973 +read,10000000,6264496 +write,10000000,5651710 +mmap_munmap,10000000 1,17905518 +send,10000000 a,8382677 +recv,,8382967 +page_fault,1000000,1550067 diff --git a/output/natrium/DEFAULT.csv b/output/natrium/DEFAULT.csv new file mode 100644 index 0000000..68ada32 --- /dev/null +++ b/output/natrium/DEFAULT.csv @@ -0,0 +1,9 @@ +name,params,time +thread,100000,1934990 +fork,16,7111068 +read,10000000,5334617 +write,10000000,4793780 +mmap_munmap,10000000 1,18237163 +send,10000000 a,7998580 +recv,,7998940 +page_fault,1000000,1345388 diff --git a/output/natrium/HARDENED_USERCOPY.csv b/output/natrium/HARDENED_USERCOPY.csv new file mode 100644 index 0000000..cc724af --- /dev/null +++ b/output/natrium/HARDENED_USERCOPY.csv @@ -0,0 +1,9 @@ +name,params,time +thread,100000,1943227 +fork,16,7191991 +read,10000000,5395271 +write,10000000,4830818 +mmap_munmap,10000000 1,17812149 +send,10000000 a,7749793 +recv,,7750258 +page_fault,1000000,1334391 diff --git a/output/natrium/MEMCG.csv b/output/natrium/MEMCG.csv new file mode 100644 index 0000000..3eafc8c --- /dev/null +++ b/output/natrium/MEMCG.csv @@ -0,0 +1,9 @@ +name,params,time +thread,100000,1797385 +fork,16,6974016 +read,10000000,5381693 +write,10000000,4873306 +mmap_munmap,10000000 1,17425632 +send,10000000 a,8035036 +recv,,8035410 +page_fault,1000000,1189830 diff --git a/output/natrium/PAGE_TABLE_ISOLATION.csv b/output/natrium/PAGE_TABLE_ISOLATION.csv new file mode 100644 index 0000000..45298fc --- /dev/null +++ b/output/natrium/PAGE_TABLE_ISOLATION.csv @@ -0,0 +1,9 @@ +name,params,time +thread,100000,1848496 +fork,16,7647165 +read,10000000,3344116 +write,10000000,2861277 +mmap_munmap,10000000 1,13076872 +send,10000000 a,5704217 +recv,,5704487 +page_fault,1000000,1117476 diff --git a/output/natrium/RETPOLINE.csv b/output/natrium/RETPOLINE.csv new file mode 100644 index 0000000..0cd652a --- /dev/null +++ b/output/natrium/RETPOLINE.csv @@ -0,0 +1,9 @@ +name,params,time +thread,100000,1860709 +fork,16,6646460 +read,10000000,5189633 +write,10000000,4604218 +mmap_munmap,10000000 1,17617165 +send,10000000 a,7669007 +recv,,7669329 +page_fault,1000000,1383386 diff --git a/output/natrium/TRANSPARENT_HUGEPAGE_ALWAYS.csv b/output/natrium/TRANSPARENT_HUGEPAGE_ALWAYS.csv new file mode 100644 index 0000000..9a96725 --- /dev/null +++ b/output/natrium/TRANSPARENT_HUGEPAGE_ALWAYS.csv @@ -0,0 +1,9 @@ +name,params,time +thread,100000,1933552 +fork,16,6747983 +read,10000000,5409543 +write,10000000,4886930 +mmap_munmap,10000000 1,18223607 +send,10000000 a,8036440 +recv,,8036689 +page_fault,1000000,1346122 diff --git a/output/natrium/USERFAULTFD.csv b/output/natrium/USERFAULTFD.csv new file mode 100644 index 0000000..cf61a11 --- /dev/null +++ b/output/natrium/USERFAULTFD.csv @@ -0,0 +1,9 @@ +name,params,time +thread,100000,1933063 +fork,16,7318013 +read,10000000,5400857 +write,10000000,4791142 +mmap_munmap,10000000 1,18934820 +send,10000000 a,8020376 +recv,,8020730 +page_fault,1000000,1347027 diff --git a/output/neon/DEFAULT.csv b/output/neon/DEFAULT.csv new file mode 100644 index 0000000..dcaec7b --- /dev/null +++ b/output/neon/DEFAULT.csv @@ -0,0 +1,9 @@ +name,params,time +thread,100000,3817592 +fork,16,1506897 +read,10000000,2071193 +write,10000000,1319088 +mmap_munmap,10000000 1,8347695 +send,10000000 a,4078484 +recv,,4079221 +page_fault,1000000,1002396 diff --git a/output/neon/HARDENED_USERCOPY.csv b/output/neon/HARDENED_USERCOPY.csv new file mode 100644 index 0000000..f79fbf1 --- /dev/null +++ b/output/neon/HARDENED_USERCOPY.csv @@ -0,0 +1,9 @@ +name,params,time +thread,100000,3803675 +fork,16,1556152 +read,10000000,2070515 +write,10000000,1324634 +mmap_munmap,10000000 1,8370379 +send,10000000 a,3758370 +recv,,3758709 +page_fault,1000000,1004383 diff --git a/output/neon/MEMCG.csv b/output/neon/MEMCG.csv new file mode 100644 index 0000000..5dd32ff --- /dev/null +++ b/output/neon/MEMCG.csv @@ -0,0 +1,9 @@ +name,params,time +thread,100000,3465996 +fork,16,1567530 +read,10000000,2072820 +write,10000000,1312779 +mmap_munmap,10000000 1,7902914 +send,10000000 a,3883244 +recv,,3883382 +page_fault,1000000,896559 diff --git a/output/neon/PAGE_TABLE_ISOLATION.csv b/output/neon/PAGE_TABLE_ISOLATION.csv new file mode 100644 index 0000000..9a73e96 --- /dev/null +++ b/output/neon/PAGE_TABLE_ISOLATION.csv @@ -0,0 +1,9 @@ +name,params,time +thread,100000,3973824 +fork,16,1659793 +read,10000000,2066801 +write,10000000,1317134 +mmap_munmap,10000000 1,8410137 +send,10000000 a,3893480 +recv,,3893784 +page_fault,1000000,994256 diff --git a/output/neon/RETPOLINE.csv b/output/neon/RETPOLINE.csv new file mode 100644 index 0000000..9b60cef --- /dev/null +++ b/output/neon/RETPOLINE.csv @@ -0,0 +1,9 @@ +name,params,time +thread,100000,3933754 +fork,16,1517902 +read,10000000,1941906 +write,10000000,1176898 +mmap_munmap,10000000 1,8223167 +send,10000000 a,3659376 +recv,,3659728 +page_fault,1000000,971187 diff --git a/output/neon/TRANSPARENT_HUGEPAGE_ALWAYS.csv b/output/neon/TRANSPARENT_HUGEPAGE_ALWAYS.csv new file mode 100644 index 0000000..1f4be13 --- /dev/null +++ b/output/neon/TRANSPARENT_HUGEPAGE_ALWAYS.csv @@ -0,0 +1,9 @@ +name,params,time +thread,100000,3849698 +fork,16,1580446 +read,10000000,2068089 +write,10000000,1308937 +mmap_munmap,10000000 1,8383761 +send,10000000 a,3887162 +recv,,3887452 +page_fault,1000000,993779 diff --git a/output/neon/USERFAULTFD.csv b/output/neon/USERFAULTFD.csv new file mode 100644 index 0000000..09e13b3 --- /dev/null +++ b/output/neon/USERFAULTFD.csv @@ -0,0 +1,9 @@ +name,params,time +thread,100000,3626497 +fork,16,1610497 +read,10000000,2075477 +write,10000000,1312026 +mmap_munmap,10000000 1,8586076 +send,10000000 a,3868372 +recv,,3868925 +page_fault,1000000,1014546 diff --git a/show.py b/show.py index aba5738..8f68f6d 100644 --- a/show.py +++ b/show.py @@ -1,5 +1,5 @@ +import os import sys -from os import listdir import numpy as np import plotly.graph_objects as go @@ -13,108 +13,114 @@ mmap_munmap = [] send = [] recv = [] page_fault = [] -filenames = [] - -for filename in sorted(listdir(sys.argv[1])): - filenames.append(filename) - with open(sys.argv[1] + '/' + filename) as f: - content = f.readlines() - new_dict = dict() - for line in content[1:]: - new_dict[line.split(',')[0]] = int(line.split(',')[2]) - thread.append(int(new_dict['thread'] / 1000)) - fork.append(int(new_dict['fork'] / 1000)) - read.append(int(new_dict['read'] / 1000)) - write.append(int(new_dict['write'] / 1000)) - mmap_munmap.append(int(new_dict['mmap_munmap'] / 1000)) - send.append(int(new_dict['send'] / 1000)) - recv.append(int(new_dict['recv'] / 1000)) - page_fault.append(int(new_dict['page_fault'] / 1000)) - +configs = [] headerColor = 'grey' rowEvenColor = 'lightgrey' rowOddColor = 'white' colors = [ - 'rgb(0, 255, 0)', 'rgb(225, 255, 77)', 'rgb(212, 255, 77)', - 'rgb(212, 255, 0)', 'rgb(255, 255, 0)', 'rgb(255, 255, 51)', - 'rgb(255, 221, 51)', 'rgb(255, 102, 25)', 'rgb(255, 42, 0)' + 'rgb(63, 255, 63)', + 'rgb(191, 255, 63)', + 'rgb(223, 255, 63)', + 'rgb(255, 255, 63)', + 'rgb(255, 191, 63)', + 'rgb(255, 127, 63)', + 'rgb(255, 63, 63)', ] -threadcolorfilter = interp1d([min(thread), max(thread)], [0, 8]) +for filename in sorted(os.listdir(sys.argv[1])): + configs.append(filename[:-4]) + with open(os.path.join(sys.argv[1], filename)) as f: + content = f.readlines() + + new_dict = dict() + for line in content[1:]: + new_dict[line.split(',')[0]] = int(line.split(',')[2]) + + thread.append(int(new_dict['thread'] / 1000)) + fork.append(int(new_dict['fork'] / 1000)) + read.append(int(new_dict['read'] / 1000)) + write.append(int(new_dict['write'] / 1000)) + mmap_munmap.append(int(new_dict['mmap_munmap'] / 1000)) + send.append(int(new_dict['send'] / 1000)) + recv.append(int(new_dict['recv'] / 1000)) + page_fault.append(int(new_dict['page_fault'] / 1000)) + + +threadcolorfilter = interp1d([min(thread), max(thread)], [0, 6]) threadcolor = [int(threadcolorfilter(x)) for x in thread] -forkcolorfilter = interp1d([min(fork), max(fork)], [0, 8]) +forkcolorfilter = interp1d([min(fork), max(fork)], [0, 6]) forkcolor = [int(forkcolorfilter(x)) for x in fork] -readcolorfilter = interp1d([min(read), max(read)], [0, 8]) +readcolorfilter = interp1d([min(read), max(read)], [0, 6]) readcolor = [int(readcolorfilter(x)) for x in read] -writecolorfilter = interp1d([min(write), max(write)], [0, 8]) +writecolorfilter = interp1d([min(write), max(write)], [0, 6]) writecolor = [int(writecolorfilter(x)) for x in write] -mmap_munmapcolorfilter = interp1d([min(mmap_munmap), max(mmap_munmap)], [0, 8]) +mmap_munmapcolorfilter = interp1d([min(mmap_munmap), max(mmap_munmap)], [0, 6]) mmap_munmapcolor = [int(mmap_munmapcolorfilter(x)) for x in mmap_munmap] -sendcolorfilter = interp1d([min(send), max(send)], [0, 8]) +sendcolorfilter = interp1d([min(send), max(send)], [0, 6]) sendcolor = [int(sendcolorfilter(x)) for x in send] -recvcolorfilter = interp1d([min(recv), max(recv)], [0, 8]) +recvcolorfilter = interp1d([min(recv), max(recv)], [0, 6]) recvcolor = [int(recvcolorfilter(x)) for x in recv] -page_faultcolorfilter = interp1d([min(page_fault), max(page_fault)], [0, 8]) +page_faultcolorfilter = interp1d([min(page_fault), max(page_fault)], [0, 6]) page_faultcolor = [int(page_faultcolorfilter(x)) for x in page_fault] fig = go.Figure( - data=[go.Table( - columnorder=[1, 2, 3, 4, 5, 6, 7, 8, 9], - columnwidth=[10, 4, 4, 4, 4, 4, 4, 4, 4], - header=dict( - values=[ - "filenames", - "thread", - "fork", - "read", - "write", - "mmap_munmap", - "send", - "recv", - "page_fault" - ], - line_color='darkslategray', - fill_color=headerColor, - align=['left', 'center'], - font=dict(color='white', size=13) - ), - cells=dict( - values=[ - filenames, - thread, - fork, - read, - write, - mmap_munmap, - send, - recv, - page_fault, - ], - line_color='darkslategray', - fill_color=[ - rowOddColor, - np.array(colors)[threadcolor], - np.array(colors)[forkcolor], - np.array(colors)[readcolor], - np.array(colors)[writecolor], - np.array(colors)[mmap_munmapcolor], - np.array(colors)[sendcolor], - np.array(colors)[recvcolor], - np.array(colors)[page_faultcolor], - ], - align=['left', 'center'], - font=dict(color='darkslategray', size=13) - ) - )] + data=[go.Table( + columnorder=[1, 2, 3, 4, 5, 6, 7, 8, 9], + columnwidth=[7, 2, 2, 2, 2, 3, 2, 2, 2], + header=dict( + values=[ + "config", + "thread", + "fork", + "read", + "write", + "mmap_munmap", + "send", + "recv", + "page_fault" + ], + line_color='darkslategray', + fill_color=headerColor, + align=['left', 'center'], + font=dict(color='white', size=13) + ), + cells=dict( + values=[ + configs, + thread, + fork, + read, + write, + mmap_munmap, + send, + recv, + page_fault, + ], + line_color='darkslategray', + fill_color=[ + rowOddColor, + np.array(colors)[threadcolor], + np.array(colors)[forkcolor], + np.array(colors)[readcolor], + np.array(colors)[writecolor], + np.array(colors)[mmap_munmapcolor], + np.array(colors)[sendcolor], + np.array(colors)[recvcolor], + np.array(colors)[page_faultcolor], + ], + align=['left', 'center'], + font=dict(color='darkslategray', size=13) + ) + )] ) fig.show()