Skip to content
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

Create an SCP benchmark #5234

Open
jellyfishcake opened this issue Oct 4, 2024 · 1 comment
Open

Create an SCP benchmark #5234

jellyfishcake opened this issue Oct 4, 2024 · 1 comment
Assignees
Labels
good first issue This is a good issue for someone new to PKB

Comments

@jellyfishcake
Copy link
Contributor

This task adds a SCP benchmark for PKB. The goal of the benchmark is to scp a file to another vm and measure the time taken.
It can be divided into a few different components:

Add the benchmarking framework
create scp_benchmark.py file in linux_benchmarks
create scp_benchmark.py in windows benchmarks
populate BENCHMARK_NAME and BENCHMARK_CONFIG constants so that the benchmark can be found by PKB
create GetConfig, Prepare, Run and Cleanup functions handlers with pass/return [] as function content.
At this point you can run your new benchmark in PKB (though it will not do anything yet).

Install SCP
scp comes by default in linux, but may need installation in a windows machine. You can refer here for winscp installation process using powershell. https://winscp.net/eng/docs/library_install#google_vignette

Set up remote disks
Update BENCHMARK_CONFIG so that it is similar to netperf_benchmark. https://github.com/GoogleCloudPlatform/PerfKitBenchmarker/blob/master/perfkitbenchmarker/linux_benchmarks/netperf_benchmark.py
Update the BENCHMARK_CONFIG such that it has a disk_spec. e.g. disk_spec: *default_500_gb At this point, your VMs will be created with a remote disk.
The remote disks defaults to /scratch directory. You can validate this by ssh into the VM and issuing lsblk (or Get-Disk on Windows) command.

Prepare for benchmark run
In each of the VMs, create a large file (10GB is a start) using commands such as fallocate -l 10G foobar.img
Using python threading, concurrently copy each VM's file over to the /scratch directory of the other VM over internet. Start a timer before the copy command and time when the copy finishes.
Retrieve the time from both VMs and report the max time as the total run time.

@jellyfishcake jellyfishcake added the good first issue This is a good issue for someone new to PKB label Oct 4, 2024
@yux-m
Copy link
Contributor

yux-m commented Oct 4, 2024

I'm working on the scp_benchmark for linux🙋, currently considering separating linux and windows implementations as 2 milestones and 3 steps as described above in each, if that makes sense

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue This is a good issue for someone new to PKB
Projects
None yet
Development

No branches or pull requests

2 participants