Skip to content

Create an SCP benchmark #5260

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 7, 2024

Conversation

yux-m
Copy link
Contributor

@yux-m yux-m commented Oct 5, 2024

Summary

This PR introduces the initial implementation of the SCP benchmark for Linux as described in issue #5234.

The SCP benchmark measures the time taken to SCP a file between two VMs. The current version focuses on the Linux implementation and is functional, while the Windows implementation will follow in a future PR or updated later in this PR.

Detalis:

  • Added scp_benchmark.py in the linux_benchmarks directory.
  • Implemented the BENCHMARK_NAME and BENCHMARK_CONFIG constants so that the benchmark can be discovered and run by PKB.
  • Implemented GetConfig, Prepare, Run, and Cleanup functions.
    • Prepared SSH keys between VMs and created a random file on each VM for the SCP transfer test.
    • Implemented SCP transfer between VMs and measured the transfer time in both directions.
    • Results include individual SCP times from both VMs (VM1 to VM2, VM2 to VM1).

Testing:

The benchmark was tested on Linux VMs. Example commands and results:

  • ./pkb.py --benchmarks=scp --machine_type=e2-micro --data_disk_type=pd-ssd --data_disk_size=5
-------------------------PerfKitBenchmarker Results Summary-------------------------
SCP:
  SCP_Transfer_Time_VM1_to_VM2         90.416951 seconds                        (file_size_gb="1" run_number="0" vm1_machine_type="e2-micro" vm1_zone="us-central1-a" vm2_machine_type="e2-micro" vm2_zone="us-central1-a" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']")
  SCP_Transfer_Time_VM2_to_VM1         90.856173 seconds                        (file_size_gb="1" run_number="0" vm1_machine_type="e2-micro" vm1_zone="us-central1-a" vm2_machine_type="e2-micro" vm2_zone="us-central1-a" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']")
  lscpu                                 0.000000                                (Address sizes="46 bits physical, 48 bits virtual" Architecture="x86_64" BogoMIPS="4400.36" Byte Order="Little Endian" CPU family="6" CPU op-mode(s)="32-bit, 64-bit" CPU(s)="2" Core(s) per socket="1" Flags="fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch pti ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt arat md_clear arch_capabilities" Hypervisor vendor="KVM" L1d cache="32 KiB (1 instance)" L1i cache="32 KiB (1 instance)" L2 cache="256 KiB (1 instance)" L3 cache="55 MiB (1 instance)" Model="79" Model name="Intel(R) Xeon(R) CPU @ 2.20GHz" NUMA node(s)="1" NUMA node0 CPU(s)="0,1" On-line CPU(s) list="0,1" Socket(s)="1" Stepping="0" Thread(s) per core="2" Vendor ID="GenuineIntel" Virtualization type="full" Vulnerability Gather data sampling="Not affected" Vulnerability Itlb multihit="Not affected" Vulnerability L1tf="Mitigation; PTE Inversion" Vulnerability Mds="Mitigation; Clear CPU buffers; SMT Host state unknown" Vulnerability Meltdown="Mitigation; PTI" Vulnerability Mmio stale data="Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown" Vulnerability Reg file data sampling="Not affected" Vulnerability Retbleed="Mitigation; IBRS" Vulnerability Spec rstack overflow="Not affected" Vulnerability Spec store bypass="Mitigation; Speculative Store Bypass disabled via prctl" Vulnerability Spectre v1="Mitigation; usercopy/swapgs barriers and __user pointer sanitization" Vulnerability Spectre v2="Mitigation; IBRS; IBPB conditional; STIBP conditional; RSB filling; PBRSB-eIBRS Not affected; BHI SW loop, KVM SW loop" Vulnerability Srbds="Not affected" Vulnerability Tsx async abort="Mitigation; Clear CPU buffers; SMT Host state unknown" node_name="pkb-5df88af7-0" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']")
  lscpu                                 0.000000                                (Address sizes="46 bits physical, 48 bits virtual" Architecture="x86_64" BogoMIPS="4400.49" Byte Order="Little Endian" CPU family="6" CPU op-mode(s)="32-bit, 64-bit" CPU(s)="2" Core(s) per socket="1" Flags="fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch pti ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt arat md_clear arch_capabilities" Hypervisor vendor="KVM" L1d cache="32 KiB (1 instance)" L1i cache="32 KiB (1 instance)" L2 cache="256 KiB (1 instance)" L3 cache="55 MiB (1 instance)" Model="79" Model name="Intel(R) Xeon(R) CPU @ 2.20GHz" NUMA node(s)="1" NUMA node0 CPU(s)="0,1" On-line CPU(s) list="0,1" Socket(s)="1" Stepping="0" Thread(s) per core="2" Vendor ID="GenuineIntel" Virtualization type="full" Vulnerability Gather data sampling="Not affected" Vulnerability Itlb multihit="Not affected" Vulnerability L1tf="Mitigation; PTE Inversion" Vulnerability Mds="Mitigation; Clear CPU buffers; SMT Host state unknown" Vulnerability Meltdown="Mitigation; PTI" Vulnerability Mmio stale data="Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown" Vulnerability Reg file data sampling="Not affected" Vulnerability Retbleed="Mitigation; IBRS" Vulnerability Spec rstack overflow="Not affected" Vulnerability Spec store bypass="Mitigation; Speculative Store Bypass disabled via prctl" Vulnerability Spectre v1="Mitigation; usercopy/swapgs barriers and __user pointer sanitization" Vulnerability Spectre v2="Mitigation; IBRS; IBPB conditional; STIBP conditional; RSB filling; PBRSB-eIBRS Not affected; BHI SW loop, KVM SW loop" Vulnerability Srbds="Not affected" Vulnerability Tsx async abort="Mitigation; Clear CPU buffers; SMT Host state unknown" node_name="pkb-5df88af7-1" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']")
  proccpu                               0.000000                                (address sizes="46 bits physical, 48 bits virtual" bogomips="4400.36" bugs="bhi cpu_meltdown l1tf mds mmio_stale_data retbleed spec_store_bypass spectre_v1 spectre_v2 swapgs taa" cache size="56320 KB" cache_alignment="64" clflush size="64" cpu MHz="2200.184" cpu cores="1" cpu family="6" cpuid level="13" flags="3dnowprefetch abm adx aes apic arat arch_capabilities avx avx2 bmi1 bmi2 clflush cmov constant_tsc cpuid cx16 cx8 de erms f16c fma fpu fsgsbase fxsr hle ht hypervisor ibpb ibrs invpcid lahf_lm lm mca mce md_clear mmx movbe msr mtrr nonstop_tsc nopl nx pae pat pcid pclmulqdq pdpe1gb pge pni popcnt pse pse36 pti rdrand rdseed rdtscp rep_good rtm sep smap smep ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tsc tsc_adjust tsc_known_freq vme x2apic xsave xsaveopt xtopology" fpu="yes" fpu_exception="yes" microcode="0xffffffff" model="79" model name="Intel(R) Xeon(R) CPU @ 2.20GHz" node_name="pkb-5df88af7-0" power management="" proccpu="address sizes,bogomips,bugs,cache size,cache_alignment,clflush size,cpu MHz,cpu cores,cpu family,cpuid level,flags,fpu,fpu_exception,microcode,model,model name,power management,siblings,stepping,vendor_id,wp" siblings="2" stepping="0" vendor_id="GenuineIntel" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']" wp="yes")
  proccpu_mapping                       0.000000                                (node_name="pkb-5df88af7-0" proc_0="apicid=0;core id=0;initial apicid=0;physical id=0" proc_1="apicid=1;core id=0;initial apicid=1;physical id=0" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']")
  proccpu                               0.000000                                (address sizes="46 bits physical, 48 bits virtual" bogomips="4400.49" bugs="bhi cpu_meltdown l1tf mds mmio_stale_data retbleed spec_store_bypass spectre_v1 spectre_v2 swapgs taa" cache size="56320 KB" cache_alignment="64" clflush size="64" cpu MHz="2200.248" cpu cores="1" cpu family="6" cpuid level="13" flags="3dnowprefetch abm adx aes apic arat arch_capabilities avx avx2 bmi1 bmi2 clflush cmov constant_tsc cpuid cx16 cx8 de erms f16c fma fpu fsgsbase fxsr hle ht hypervisor ibpb ibrs invpcid lahf_lm lm mca mce md_clear mmx movbe msr mtrr nonstop_tsc nopl nx pae pat pcid pclmulqdq pdpe1gb pge pni popcnt pse pse36 pti rdrand rdseed rdtscp rep_good rtm sep smap smep ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tsc tsc_adjust tsc_known_freq vme x2apic xsave xsaveopt xtopology" fpu="yes" fpu_exception="yes" microcode="0xffffffff" model="79" model name="Intel(R) Xeon(R) CPU @ 2.20GHz" node_name="pkb-5df88af7-1" power management="" proccpu="address sizes,bogomips,bugs,cache size,cache_alignment,clflush size,cpu MHz,cpu cores,cpu family,cpuid level,flags,fpu,fpu_exception,microcode,model,model name,power management,siblings,stepping,vendor_id,wp" siblings="2" stepping="0" vendor_id="GenuineIntel" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']" wp="yes")
  proccpu_mapping                       0.000000                                (node_name="pkb-5df88af7-1" proc_0="apicid=0;core id=0;initial apicid=0;physical id=0" proc_1="apicid=1;core id=0;initial apicid=1;physical id=0" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']")
  cpu_vuln                              0.000000                                (mitigation_l1tf="PTE Inversion" mitigation_mds="Clear CPU buffers; SMT Host state unknown" mitigation_meltdown="PTI" mitigation_retbleed="IBRS" mitigation_spec_store_bypass="Speculative Store Bypass disabled via prctl" mitigation_spectre_v1="usercopy/swapgs barriers and __user pointer sanitization" mitigation_spectre_v2="IBRS; IBPB: conditional; STIBP: conditional; RSB filling; PBRSB-eIBRS: Not affected; BHI: SW loop, KVM: SW loop" mitigation_tsx_async_abort="Clear CPU buffers; SMT Host state unknown" mitigations="l1tf,mds,meltdown,retbleed,spec_store_bypass,spectre_v1,spectre_v2,tsx_async_abort" notaffecteds="gather_data_sampling,itlb_multihit,reg_file_data_sampling,spec_rstack_overflow,srbds" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']" vm_name="pkb-5df88af7-0" vulnerabilities="mmio_stale_data" vulnerability_mmio_stale_data="Clear CPU buffers attempted, no microcode; SMT Host state unknown")
  cpu_vuln                              0.000000                                (mitigation_l1tf="PTE Inversion" mitigation_mds="Clear CPU buffers; SMT Host state unknown" mitigation_meltdown="PTI" mitigation_retbleed="IBRS" mitigation_spec_store_bypass="Speculative Store Bypass disabled via prctl" mitigation_spectre_v1="usercopy/swapgs barriers and __user pointer sanitization" mitigation_spectre_v2="IBRS; IBPB: conditional; STIBP: conditional; RSB filling; PBRSB-eIBRS: Not affected; BHI: SW loop, KVM: SW loop" mitigation_tsx_async_abort="Clear CPU buffers; SMT Host state unknown" mitigations="l1tf,mds,meltdown,retbleed,spec_store_bypass,spectre_v1,spectre_v2,tsx_async_abort" notaffecteds="gather_data_sampling,itlb_multihit,reg_file_data_sampling,spec_rstack_overflow,srbds" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']" vm_name="pkb-5df88af7-1" vulnerabilities="mmio_stale_data" vulnerability_mmio_stale_data="Clear CPU buffers attempted, no microcode; SMT Host state unknown")
  gcc_version                           0.000000                                (name="pkb-5df88af7-0" versiondump="" versioninfo="None" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']")
  gcc_version                           0.000000                                (name="pkb-5df88af7-1" versiondump="" versioninfo="None" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']")
  glibc_version                         0.000000                                (name="pkb-5df88af7-0" versioninfo="ldd (Ubuntu GLIBC 2.39-0ubuntu8.3) 2.39" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']")
  glibc_version                         0.000000                                (name="pkb-5df88af7-1" versioninfo="ldd (Ubuntu GLIBC 2.39-0ubuntu8.3) 2.39" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']")
  End to End Runtime                  453.342871 seconds                        (vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']")

-------------------------
For all tests: perfkitbenchmarker_version="v1.12.0-4864-g4320a71f" vm_1_/dev/loop0="67080192" vm_1_/dev/loop1="391553024" vm_1_/dev/loop2="40714240" vm_1_/dev/sda="10737418240" vm_1_/dev/sdb="5368709120" vm_1_automatic_restart="False" vm_1_boot_disk_size="10" vm_1_boot_disk_type="pd-balanced" vm_1_cloud="GCP" vm_1_cpu_arch="x86_64" vm_1_cpu_version="GenuineIntel_6_79_0" vm_1_data_disk_0_fstab_options="defaults" vm_1_data_disk_0_media="ssd" vm_1_data_disk_0_mount_options="discard" vm_1_data_disk_0_num_stripes="1" vm_1_data_disk_0_replication="zone" vm_1_data_disk_0_size="5" vm_1_data_disk_0_type="pd-ssd" vm_1_data_disk_count="1" vm_1_dedicated_host="False" vm_1_disk_filesystem_blocksize="4096" vm_1_disk_filesystem_type="ext4" vm_1_gce_network_name="pkb-network-5df88af7" vm_1_gce_network_tier="premium" vm_1_gce_shielded_secure_boot="False" vm_1_gce_subnet_name="" vm_1_image="ubuntu-2404-noble-amd64-v20241004" vm_1_image_family="ubuntu-2404-lts-amd64" vm_1_image_project="ubuntu-os-cloud" vm_1_kernel_release="6.8.0-1015-gcp" vm_1_machine_type="e2-micro" vm_1_mtu="1460" vm_1_num_cpus="2" vm_1_numa_node_count="1" vm_1_os_info="Ubuntu 24.04.1 LTS" vm_1_os_type="ubuntu2404" vm_1_placement_group_style="none" vm_1_project="ghc-perfkit" vm_1_tcp_congestion_control="cubic" vm_1_threads_per_core="2" vm_1_vm_count="1" vm_1_vm_ids="7838006806519295158" vm_1_vm_ip_addresses="35.232.201.29" vm_1_vm_names="pkb-5df88af7-0" vm_1_zone="us-central1-a" vm_2_/dev/loop0="67080192" vm_2_/dev/loop1="391553024" vm_2_/dev/loop2="40714240" vm_2_/dev/sda="10737418240" vm_2_/dev/sdb="5368709120" vm_2_automatic_restart="False" vm_2_boot_disk_size="10" vm_2_boot_disk_type="pd-balanced" vm_2_cloud="GCP" vm_2_cpu_arch="x86_64" vm_2_cpu_version="GenuineIntel_6_79_0" vm_2_data_disk_0_fstab_options="defaults" vm_2_data_disk_0_media="ssd" vm_2_data_disk_0_mount_options="discard" vm_2_data_disk_0_num_stripes="1" vm_2_data_disk_0_replication="zone" vm_2_data_disk_0_size="5" vm_2_data_disk_0_type="pd-ssd" vm_2_data_disk_count="1" vm_2_dedicated_host="False" vm_2_disk_filesystem_blocksize="4096" vm_2_disk_filesystem_type="ext4" vm_2_gce_network_name="pkb-network-5df88af7" vm_2_gce_network_tier="premium" vm_2_gce_shielded_secure_boot="False" vm_2_gce_subnet_name="" vm_2_image="ubuntu-2404-noble-amd64-v20241004" vm_2_image_family="ubuntu-2404-lts-amd64" vm_2_image_project="ubuntu-os-cloud" vm_2_kernel_release="6.8.0-1015-gcp" vm_2_machine_type="e2-micro" vm_2_mtu="1460" vm_2_num_cpus="2" vm_2_numa_node_count="1" vm_2_os_info="Ubuntu 24.04.1 LTS" vm_2_os_type="ubuntu2404" vm_2_placement_group_style="none" vm_2_project="ghc-perfkit" vm_2_tcp_congestion_control="cubic" vm_2_threads_per_core="2" vm_2_vm_count="1" vm_2_vm_ids="4144752862341967030" vm_2_vm_ip_addresses="34.170.109.125" vm_2_vm_names="pkb-5df88af7-1" vm_2_zone="us-central1-a" vm_ids="7838006806519295158,4144752862341967030" vm_ip_addresses="35.232.201.29,34.170.109.125" vm_names="pkb-5df88af7-0,pkb-5df88af7-1"
2024-10-05 01:18:26,506 5df88af7 MainThread INFO     Benchmark run statuses:
---------------------------------------
Name  UID   Status     Failed Substatus
---------------------------------------
scp   scp0  SUCCEEDED                  
---------------------------------------
  • ./pkb.py --benchmarks=scp --machine_type=e2-micro --data_disk_type=pd-ssd --data_disk_size=20 --scp_file_size_gb=8
-------------------------PerfKitBenchmarker Results Summary-------------------------
SCP:
  SCP_Transfer_Time_VM1_to_VM2        615.115628 seconds                        (file_size_gb="8" run_number="0" vm1_machine_type="e2-micro" vm1_zone="us-central1-a" vm2_machine_type="e2-micro" vm2_zone="us-central1-a" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']")
  SCP_Transfer_Time_VM2_to_VM1        554.013225 seconds                        (file_size_gb="8" run_number="0" vm1_machine_type="e2-micro" vm1_zone="us-central1-a" vm2_machine_type="e2-micro" vm2_zone="us-central1-a" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']")
  lscpu                                 0.000000                                (Address sizes="46 bits physical, 48 bits virtual" Architecture="x86_64" BogoMIPS="4400.40" Byte Order="Little Endian" CPU family="6" CPU op-mode(s)="32-bit, 64-bit" CPU(s)="2" Core(s) per socket="1" Flags="fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch pti ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt arat md_clear arch_capabilities" Hypervisor vendor="KVM" L1d cache="32 KiB (1 instance)" L1i cache="32 KiB (1 instance)" L2 cache="256 KiB (1 instance)" L3 cache="55 MiB (1 instance)" Model="79" Model name="Intel(R) Xeon(R) CPU @ 2.20GHz" NUMA node(s)="1" NUMA node0 CPU(s)="0,1" On-line CPU(s) list="0,1" Socket(s)="1" Stepping="0" Thread(s) per core="2" Vendor ID="GenuineIntel" Virtualization type="full" Vulnerability Gather data sampling="Not affected" Vulnerability Itlb multihit="Not affected" Vulnerability L1tf="Mitigation; PTE Inversion" Vulnerability Mds="Mitigation; Clear CPU buffers; SMT Host state unknown" Vulnerability Meltdown="Mitigation; PTI" Vulnerability Mmio stale data="Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown" Vulnerability Reg file data sampling="Not affected" Vulnerability Retbleed="Mitigation; IBRS" Vulnerability Spec rstack overflow="Not affected" Vulnerability Spec store bypass="Mitigation; Speculative Store Bypass disabled via prctl" Vulnerability Spectre v1="Mitigation; usercopy/swapgs barriers and __user pointer sanitization" Vulnerability Spectre v2="Mitigation; IBRS; IBPB conditional; STIBP conditional; RSB filling; PBRSB-eIBRS Not affected; BHI SW loop, KVM SW loop" Vulnerability Srbds="Not affected" Vulnerability Tsx async abort="Mitigation; Clear CPU buffers; SMT Host state unknown" node_name="pkb-24ddb2dc-0" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']")
  lscpu                                 0.000000                                (Address sizes="46 bits physical, 48 bits virtual" Architecture="x86_64" BogoMIPS="4400.39" Byte Order="Little Endian" CPU family="6" CPU op-mode(s)="32-bit, 64-bit" CPU(s)="2" Core(s) per socket="1" Flags="fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch pti ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt arat md_clear arch_capabilities" Hypervisor vendor="KVM" L1d cache="32 KiB (1 instance)" L1i cache="32 KiB (1 instance)" L2 cache="256 KiB (1 instance)" L3 cache="55 MiB (1 instance)" Model="79" Model name="Intel(R) Xeon(R) CPU @ 2.20GHz" NUMA node(s)="1" NUMA node0 CPU(s)="0,1" On-line CPU(s) list="0,1" Socket(s)="1" Stepping="0" Thread(s) per core="2" Vendor ID="GenuineIntel" Virtualization type="full" Vulnerability Gather data sampling="Not affected" Vulnerability Itlb multihit="Not affected" Vulnerability L1tf="Mitigation; PTE Inversion" Vulnerability Mds="Mitigation; Clear CPU buffers; SMT Host state unknown" Vulnerability Meltdown="Mitigation; PTI" Vulnerability Mmio stale data="Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown" Vulnerability Reg file data sampling="Not affected" Vulnerability Retbleed="Mitigation; IBRS" Vulnerability Spec rstack overflow="Not affected" Vulnerability Spec store bypass="Mitigation; Speculative Store Bypass disabled via prctl" Vulnerability Spectre v1="Mitigation; usercopy/swapgs barriers and __user pointer sanitization" Vulnerability Spectre v2="Mitigation; IBRS; IBPB conditional; STIBP conditional; RSB filling; PBRSB-eIBRS Not affected; BHI SW loop, KVM SW loop" Vulnerability Srbds="Not affected" Vulnerability Tsx async abort="Mitigation; Clear CPU buffers; SMT Host state unknown" node_name="pkb-24ddb2dc-1" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']")
  proccpu                               0.000000                                (address sizes="46 bits physical, 48 bits virtual" bogomips="4400.40" bugs="bhi cpu_meltdown l1tf mds mmio_stale_data retbleed spec_store_bypass spectre_v1 spectre_v2 swapgs taa" cache size="56320 KB" cache_alignment="64" clflush size="64" cpu MHz="2200.204" cpu cores="1" cpu family="6" cpuid level="13" flags="3dnowprefetch abm adx aes apic arat arch_capabilities avx avx2 bmi1 bmi2 clflush cmov constant_tsc cpuid cx16 cx8 de erms f16c fma fpu fsgsbase fxsr hle ht hypervisor ibpb ibrs invpcid lahf_lm lm mca mce md_clear mmx movbe msr mtrr nonstop_tsc nopl nx pae pat pcid pclmulqdq pdpe1gb pge pni popcnt pse pse36 pti rdrand rdseed rdtscp rep_good rtm sep smap smep ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tsc tsc_adjust tsc_known_freq vme x2apic xsave xsaveopt xtopology" fpu="yes" fpu_exception="yes" microcode="0xffffffff" model="79" model name="Intel(R) Xeon(R) CPU @ 2.20GHz" node_name="pkb-24ddb2dc-0" power management="" proccpu="address sizes,bogomips,bugs,cache size,cache_alignment,clflush size,cpu MHz,cpu cores,cpu family,cpuid level,flags,fpu,fpu_exception,microcode,model,model name,power management,siblings,stepping,vendor_id,wp" siblings="2" stepping="0" vendor_id="GenuineIntel" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']" wp="yes")
  proccpu_mapping                       0.000000                                (node_name="pkb-24ddb2dc-0" proc_0="apicid=0;core id=0;initial apicid=0;physical id=0" proc_1="apicid=1;core id=0;initial apicid=1;physical id=0" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']")
  proccpu                               0.000000                                (address sizes="46 bits physical, 48 bits virtual" bogomips="4400.39" bugs="bhi cpu_meltdown l1tf mds mmio_stale_data retbleed spec_store_bypass spectre_v1 spectre_v2 swapgs taa" cache size="56320 KB" cache_alignment="64" clflush size="64" cpu MHz="2200.198" cpu cores="1" cpu family="6" cpuid level="13" flags="3dnowprefetch abm adx aes apic arat arch_capabilities avx avx2 bmi1 bmi2 clflush cmov constant_tsc cpuid cx16 cx8 de erms f16c fma fpu fsgsbase fxsr hle ht hypervisor ibpb ibrs invpcid lahf_lm lm mca mce md_clear mmx movbe msr mtrr nonstop_tsc nopl nx pae pat pcid pclmulqdq pdpe1gb pge pni popcnt pse pse36 pti rdrand rdseed rdtscp rep_good rtm sep smap smep ss ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tsc tsc_adjust tsc_known_freq vme x2apic xsave xsaveopt xtopology" fpu="yes" fpu_exception="yes" microcode="0xffffffff" model="79" model name="Intel(R) Xeon(R) CPU @ 2.20GHz" node_name="pkb-24ddb2dc-1" power management="" proccpu="address sizes,bogomips,bugs,cache size,cache_alignment,clflush size,cpu MHz,cpu cores,cpu family,cpuid level,flags,fpu,fpu_exception,microcode,model,model name,power management,siblings,stepping,vendor_id,wp" siblings="2" stepping="0" vendor_id="GenuineIntel" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']" wp="yes")
  proccpu_mapping                       0.000000                                (node_name="pkb-24ddb2dc-1" proc_0="apicid=0;core id=0;initial apicid=0;physical id=0" proc_1="apicid=1;core id=0;initial apicid=1;physical id=0" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']")
  cpu_vuln                              0.000000                                (mitigation_l1tf="PTE Inversion" mitigation_mds="Clear CPU buffers; SMT Host state unknown" mitigation_meltdown="PTI" mitigation_retbleed="IBRS" mitigation_spec_store_bypass="Speculative Store Bypass disabled via prctl" mitigation_spectre_v1="usercopy/swapgs barriers and __user pointer sanitization" mitigation_spectre_v2="IBRS; IBPB: conditional; STIBP: conditional; RSB filling; PBRSB-eIBRS: Not affected; BHI: SW loop, KVM: SW loop" mitigation_tsx_async_abort="Clear CPU buffers; SMT Host state unknown" mitigations="l1tf,mds,meltdown,retbleed,spec_store_bypass,spectre_v1,spectre_v2,tsx_async_abort" notaffecteds="gather_data_sampling,itlb_multihit,reg_file_data_sampling,spec_rstack_overflow,srbds" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']" vm_name="pkb-24ddb2dc-0" vulnerabilities="mmio_stale_data" vulnerability_mmio_stale_data="Clear CPU buffers attempted, no microcode; SMT Host state unknown")
  cpu_vuln                              0.000000                                (mitigation_l1tf="PTE Inversion" mitigation_mds="Clear CPU buffers; SMT Host state unknown" mitigation_meltdown="PTI" mitigation_retbleed="IBRS" mitigation_spec_store_bypass="Speculative Store Bypass disabled via prctl" mitigation_spectre_v1="usercopy/swapgs barriers and __user pointer sanitization" mitigation_spectre_v2="IBRS; IBPB: conditional; STIBP: conditional; RSB filling; PBRSB-eIBRS: Not affected; BHI: SW loop, KVM: SW loop" mitigation_tsx_async_abort="Clear CPU buffers; SMT Host state unknown" mitigations="l1tf,mds,meltdown,retbleed,spec_store_bypass,spectre_v1,spectre_v2,tsx_async_abort" notaffecteds="gather_data_sampling,itlb_multihit,reg_file_data_sampling,spec_rstack_overflow,srbds" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']" vm_name="pkb-24ddb2dc-1" vulnerabilities="mmio_stale_data" vulnerability_mmio_stale_data="Clear CPU buffers attempted, no microcode; SMT Host state unknown")
  gcc_version                           0.000000                                (name="pkb-24ddb2dc-0" versiondump="" versioninfo="None" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']")
  gcc_version                           0.000000                                (name="pkb-24ddb2dc-1" versiondump="" versioninfo="None" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']")
  glibc_version                         0.000000                                (name="pkb-24ddb2dc-0" versioninfo="ldd (Ubuntu GLIBC 2.39-0ubuntu8.3) 2.39" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']")
  glibc_version                         0.000000                                (name="pkb-24ddb2dc-1" versioninfo="ldd (Ubuntu GLIBC 2.39-0ubuntu8.3) 2.39" vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']")
  End to End Runtime                 1237.515663 seconds                        (vm_1_gce_nic_type="['GVNIC']" vm_2_gce_nic_type="['GVNIC']")

-------------------------
For all tests: perfkitbenchmarker_version="v1.12.0-4864-g4320a71f" vm_1_/dev/loop0="67080192" vm_1_/dev/loop1="391553024" vm_1_/dev/loop2="40714240" vm_1_/dev/sda="10737418240" vm_1_/dev/sdb="21474836480" vm_1_automatic_restart="False" vm_1_boot_disk_size="10" vm_1_boot_disk_type="pd-balanced" vm_1_cloud="GCP" vm_1_cpu_arch="x86_64" vm_1_cpu_version="GenuineIntel_6_79_0" vm_1_data_disk_0_fstab_options="defaults" vm_1_data_disk_0_media="ssd" vm_1_data_disk_0_mount_options="discard" vm_1_data_disk_0_num_stripes="1" vm_1_data_disk_0_replication="zone" vm_1_data_disk_0_size="20" vm_1_data_disk_0_type="pd-ssd" vm_1_data_disk_count="1" vm_1_dedicated_host="False" vm_1_disk_filesystem_blocksize="4096" vm_1_disk_filesystem_type="ext4" vm_1_gce_network_name="pkb-network-24ddb2dc" vm_1_gce_network_tier="premium" vm_1_gce_shielded_secure_boot="False" vm_1_gce_subnet_name="" vm_1_image="ubuntu-2404-noble-amd64-v20241004" vm_1_image_family="ubuntu-2404-lts-amd64" vm_1_image_project="ubuntu-os-cloud" vm_1_kernel_release="6.8.0-1015-gcp" vm_1_machine_type="e2-micro" vm_1_mtu="1460" vm_1_num_cpus="2" vm_1_numa_node_count="1" vm_1_os_info="Ubuntu 24.04.1 LTS" vm_1_os_type="ubuntu2404" vm_1_placement_group_style="none" vm_1_project="ghc-perfkit" vm_1_tcp_congestion_control="cubic" vm_1_threads_per_core="2" vm_1_vm_count="1" vm_1_vm_ids="501754407804548257" vm_1_vm_ip_addresses="34.28.163.98" vm_1_vm_names="pkb-24ddb2dc-0" vm_1_zone="us-central1-a" vm_2_/dev/loop0="67080192" vm_2_/dev/loop1="391553024" vm_2_/dev/loop2="40714240" vm_2_/dev/sda="10737418240" vm_2_/dev/sdb="21474836480" vm_2_automatic_restart="False" vm_2_boot_disk_size="10" vm_2_boot_disk_type="pd-balanced" vm_2_cloud="GCP" vm_2_cpu_arch="x86_64" vm_2_cpu_version="GenuineIntel_6_79_0" vm_2_data_disk_0_fstab_options="defaults" vm_2_data_disk_0_media="ssd" vm_2_data_disk_0_mount_options="discard" vm_2_data_disk_0_num_stripes="1" vm_2_data_disk_0_replication="zone" vm_2_data_disk_0_size="20" vm_2_data_disk_0_type="pd-ssd" vm_2_data_disk_count="1" vm_2_dedicated_host="False" vm_2_disk_filesystem_blocksize="4096" vm_2_disk_filesystem_type="ext4" vm_2_gce_network_name="pkb-network-24ddb2dc" vm_2_gce_network_tier="premium" vm_2_gce_shielded_secure_boot="False" vm_2_gce_subnet_name="" vm_2_image="ubuntu-2404-noble-amd64-v20241004" vm_2_image_family="ubuntu-2404-lts-amd64" vm_2_image_project="ubuntu-os-cloud" vm_2_kernel_release="6.8.0-1015-gcp" vm_2_machine_type="e2-micro" vm_2_mtu="1460" vm_2_num_cpus="2" vm_2_numa_node_count="1" vm_2_os_info="Ubuntu 24.04.1 LTS" vm_2_os_type="ubuntu2404" vm_2_placement_group_style="none" vm_2_project="ghc-perfkit" vm_2_tcp_congestion_control="cubic" vm_2_threads_per_core="2" vm_2_vm_count="1" vm_2_vm_ids="6176868509040850081" vm_2_vm_ip_addresses="34.31.17.105" vm_2_vm_names="pkb-24ddb2dc-1" vm_2_zone="us-central1-a" vm_ids="501754407804548257,6176868509040850081" vm_ip_addresses="34.28.163.98,34.31.17.105" vm_names="pkb-24ddb2dc-0,pkb-24ddb2dc-1"
2024-10-05 00:57:15,328 24ddb2dc MainThread INFO     Benchmark run statuses:
---------------------------------------
Name  UID   Status     Failed Substatus
---------------------------------------
scp   scp0  SUCCEEDED                  
---------------------------------------

Pending Items:

  • Further testing with different configurations. (I didn't test with many different configs given the quota limit. There might be some corner cases uncovered.)
  • Implement the Windows counterpart of the SCP benchmark.
    • Install and configure WinSCP on Windows VMs, and adjust the SCP commands accordingly.

Seeking feedback! & Thanks again for your helpful guidance on the GHC open source day!

Copy link
Contributor

@jellyfishcake jellyfishcake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow this is really great! Exactly as we want it!
There are a couple of very minor linter issues, i.e. you don't seem to need to import data and vm_util.
In future, you can lint with the pyink formatter:
pyink --pyink-indentation 2 --pyink-use-majority-quotes --unstable --line-length=80 {file_path}
It's our bad that the documentation for the linter is so hidden. We should float it higher.

@copybara-service copybara-service bot merged commit 18cf91b into GoogleCloudPlatform:master Oct 7, 2024
3 checks passed
@jellyfishcake
Copy link
Contributor

jellyfishcake commented Oct 7, 2024

This is super high-quality code, we are very impressed and very much appreciate your contribution!

Further testing with different configurations. (I didn't test with many different configs given the quota limit. There might be some corner cases uncovered.)

Even with your configurations, we can see that the two threads are ~10% different in speed. This means that in-bound and out-bound work are not handled at the same rate. The next part of the puzzle (on our part), will be to understand why this difference exist. Thank you! :)

Implement the Windows counterpart of the SCP benchmark.

We don't have a lot of Windows benchmarks, https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/tree/master/perfkitbenchmarker/windows_benchmarks shows the few we have. The rest of the setup should be similar, with the commands being swapped to Windows. If you need a Windows machine, you can create a VM in the GCP console, and then RDP into it using the RDP client (you will have to download an RDP client.) The Windows password is another tricky part: During a run, PKB would have generated a Windows password, and if you need to RDP into that particular machine, you will have to log it via this flag: https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/windows_virtual_machine.py#L37

@yux-m
Copy link
Contributor Author

yux-m commented Oct 7, 2024

Thank you! @jellyfishcake
I'll be working on the benchmark for Windows (likely post-GHC) and your guide on testing with a Windows machine is exactly what I need!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants