update graph.py to include aws

This commit is contained in:
Moritz Eckert 2024-01-02 16:16:03 +01:00
parent 26d2e67fe7
commit d49b68b59f
Failed to extract signature
2 changed files with 64 additions and 5 deletions

View File

@ -93,7 +93,7 @@ EOF
# Run kubestr
mkdir -p out
kubestr fio -e "out/fio-AKS.json" -o json -s default -z 400Gi -f constellation/.github/actions/e2e_benchmark/fio.ini
kubestr fio -e "out/fio-AKS.json" -o json -s default-no-cache -z 400Gi -f constellation/.github/actions/e2e_benchmark/fio.ini
# Run knb
workers="$(kubectl get nodes | grep nodepool)"
@ -263,7 +263,7 @@ The action updates the stored Constellation records for the selected cloud provi
## Drawing Performance Charts
The action also contains the code to draw graphs as used in the [Constellation docs](https://docs.edgeless.systems/constellation/next/overview/performance).
The graphs compare the performance of Constellation to the performance of managed Kubernetes clusters.
It expects the results of `[AKS.json, GKE.json, constellation-azure.json, constellation-gcp.json]` to be present in the `BDIR` folder.
It expects the results of `[AKS.json, GKE.json, EKS.json, constellation-azure.json, constellation-gcp.json, constellation-aws.json]` to be present in the `BDIR` folder.
Graphs can then be created using the `graphs.py` script:

View File

@ -12,14 +12,16 @@ from matplotlib import font_manager as fm
SUBJECTS_AZURE = ['constellation-azure', 'AKS']
SUBJECTS_GCP = ['constellation-gcp', 'GKE']
SUBJECTS_AWS = ['constellation-aws', 'EKS']
LEGEND_NAMES_AZURE = ['Constellation', 'AKS']
LEGEND_NAMES_GCP = ['Constellation', 'GKE']
LEGEND_NAMES_AWS = ['Constellation', 'EKS']
BAR_COLORS = ['#90FF99', '#929292', '#8B04DD', '#000000']
FONT_URL = "https://github.com/google/fonts/raw/main/apache/roboto/static/Roboto-Regular.ttf"
FONT_URL = "https://github.com/openmaptiles/fonts/raw/master/roboto/Roboto-Regular.ttf"
FONT_NAME = "Roboto-Regular.ttf"
FONT_SIZE = 13
@ -115,7 +117,7 @@ def main():
out_dir = configure()
combined_results = defaultdict(dict)
for test in SUBJECTS_AZURE+SUBJECTS_GCP:
for test in SUBJECTS_AZURE+SUBJECTS_GCP+SUBJECTS_AWS:
# Read the previous results
read_path = os.path.join(
out_dir, '{subject}.json'.format(subject=test))
@ -157,6 +159,21 @@ def main():
save_name = os.path.join(out_dir, 'benchmark_net_p2p_gcp.png')
plt.savefig(save_name)
# P2P TCP + UDP AWS
net_data = {}
for s, l in zip(SUBJECTS_AWS, LEGEND_NAMES_AWS):
net_data[l+" - TCP"] = int(combined_results[s]
['knb']['pod2pod']['tcp_bw_mbit'])
for s, l in zip(SUBJECTS_AWS, LEGEND_NAMES_AWS):
net_data[l+" - UDP"] = int(combined_results[s]
['knb']['pod2pod']['udp_bw_mbit'])
bar_chart(data=net_data,
title='K8S CNI Benchmark - Pod to Pod - AWS - Bandwidth',
unit=net_unit,
x_label=f"Bandwidth in {net_unit} - Higher is better")
save_name = os.path.join(out_dir, 'benchmark_net_p2p_aws.png')
plt.savefig(save_name)
# P2SVC TCP + UDP Azure
net_data = {}
for s, l in zip(SUBJECTS_AZURE, LEGEND_NAMES_AZURE):
@ -172,7 +189,7 @@ def main():
save_name = os.path.join(out_dir, 'benchmark_net_p2svc_azure.png')
plt.savefig(save_name)
# P2P TCP + UDP GCP
# P2SVC TCP + UDP GCP
net_data = {}
for s, l in zip(SUBJECTS_GCP, LEGEND_NAMES_GCP):
net_data[l+" - TCP"] = int(combined_results[s]
@ -187,6 +204,21 @@ def main():
save_name = os.path.join(out_dir, 'benchmark_net_p2svc_gcp.png')
plt.savefig(save_name)
# P2SVC TCP + UDP GCP
net_data = {}
for s, l in zip(SUBJECTS_AWS, LEGEND_NAMES_AWS):
net_data[l+" - TCP"] = int(combined_results[s]
['knb']['pod2svc']['tcp_bw_mbit'])
for s, l in zip(SUBJECTS_AWS, LEGEND_NAMES_AWS):
net_data[l+" - UDP"] = int(combined_results[s]
['knb']['pod2svc']['udp_bw_mbit'])
bar_chart(data=net_data,
title='K8S CNI Benchmark - Pod to Service - AWS - Bandwidth',
unit=net_unit,
x_label=f"Bandwidth in {net_unit} - Higher is better")
save_name = os.path.join(out_dir, 'benchmark_net_p2svc_aws.png')
plt.savefig(save_name)
# FIO charts
# IOPS on Azure
@ -217,6 +249,20 @@ def main():
save_name = os.path.join(out_dir, 'benchmark_fio_gcp_iops.png')
plt.savefig(save_name)
# IOPS on AWS
fio_data = {}
for s, l in zip(SUBJECTS_AWS, LEGEND_NAMES_AWS):
fio_data[l+" - Read"] = int(combined_results[s]
['fio']['read_iops']['iops'])
for s, l in zip(SUBJECTS_AWS, LEGEND_NAMES_AWS):
fio_data[l+" - Write"] = int(combined_results[s]
['fio']['write_iops']['iops'])
bar_chart(data=fio_data,
title='FIO Benchmark - AWS - IOPS',
x_label=f"{fio_iops_unit} - Higher is better")
save_name = os.path.join(out_dir, 'benchmark_fio_aws_iops.png')
plt.savefig(save_name)
# Bandwidth on Azure
fio_data = {}
for s, l in zip(SUBJECTS_AZURE, LEGEND_NAMES_AZURE):
@ -245,6 +291,19 @@ def main():
save_name = os.path.join(out_dir, 'benchmark_fio_gcp_bw.png')
plt.savefig(save_name)
# Bandwidth on AWS
fio_data = {}
for s, l in zip(SUBJECTS_AWS, LEGEND_NAMES_AWS):
fio_data[l+" - Read"] = int(combined_results[s]
['fio']['read_bw']['bw_kbytes'] / 1024)
for s, l in zip(SUBJECTS_AWS, LEGEND_NAMES_AWS):
fio_data[l+" - Write"] = int(combined_results[s]
['fio']['write_bw']['bw_kbytes'] / 1024)
bar_chart(data=fio_data,
title='FIO Benchmark - AWS - Bandwidth',
x_label=f"Bandwidth in {fio_bw_unit} - Higher is better")
save_name = os.path.join(out_dir, 'benchmark_fio_aws_bw.png')
plt.savefig(save_name)
if __name__ == '__main__':
main()