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

Oci provider allow port #3

Open
wants to merge 56 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
c943d04
Enable OCI as a Cloud provider in PKB. Virtual Machine, Networking an…
Feb 27, 2023
ad390d4
VNIC will now be assigned a DNS record on launching a compute instance
Mar 8, 2023
d731a8a
DNS label for the VCN, subnet and IG
Mar 8, 2023
7e51343
Enable Oracle 8 and Oracle 9 in PKB
Mar 10, 2023
4632474
Fix gcp_alloy_db flags not being parsed
raymond13513 May 15, 2023
eb77fb4
Add Windows static VM class.
May 16, 2023
6adeeec
Do not fail when windows VM's temp dir exists
May 16, 2023
c5ecfb5
Set the correct device path for local NVME SSD's.
andyz422 May 17, 2023
e604b49
Change GCP disk PDDriveIsNvme condition.
andyz422 May 17, 2023
4524953
Support suppressing printing samples to standard output and remove pr…
raymond13513 May 17, 2023
4e3e20d
Add `timeout_exception` to the `vm_util` function retry wrapper; use …
May 17, 2023
d3c1d7a
Degradation percent currently does not consider the LM_end time corre…
raymond13513 May 17, 2023
89c16a5
Collect client latency in redis benchmark
tohaowu May 17, 2023
c085ed6
Add test for TCP STREAM using multiple streams.
May 18, 2023
cb2ee22
Support g2 placement groups for GCP
May 19, 2023
469ebd9
Upgrade GPU to CUDA 12.1
tohaowu May 19, 2023
8c4cb13
L4 GPU is Ada Lovelace architecture, not Telsa architecture.
tohaowu May 19, 2023
c981e4b
Upgrade default OS from Ubuntu1804 to Ubuntu2004.
andyz422 May 19, 2023
6a2f649
Correct L4 GPU type name.
tohaowu May 22, 2023
fb22e98
Add defaults to memtier.py dataclasses.
bvliu May 23, 2023
b376275
Add partial support for multiple client VMs in relational_db.py.
bvliu May 23, 2023
ef11757
Fix incorrect flag in AWS memcached.
bvliu May 24, 2023
205fd0b
Add microsecond parsing support for linux_boot.
dlott May 24, 2023
f410a0b
Add shared flag for managed memorystore shard counts.
bvliu May 25, 2023
b95351e
Store metadata as instance variable on MemtierResult.
bvliu May 25, 2023
2fc5741
Fix disk size job property for Dataproc Serverless and support custom…
dorellang May 25, 2023
5d7f871
Add support for NCCL Fast Socket on GKE.
pmkc May 25, 2023
0bfaed1
Change lmbench_benchmark commit version since default os_type is now …
andyz422 May 26, 2023
fe46741
Add formatted metric names for TCP_STREAM of netperf benchmark test. …
May 26, 2023
0d47727
Change ha for flexible server to be zone-redundant as flexible server…
raymond13513 May 26, 2023
e130386
Before invoking MeasureDelete, ensure there is a delete time to measure.
May 26, 2023
cee9161
Raise insufficient capacity on rds
raymond13513 May 30, 2023
56c0ec7
Add max thread and client count to cloud redis memtier binary search.
bvliu May 30, 2023
80818de
No need to install nvidia-docker if it exists
tohaowu May 30, 2023
1a12846
Print summary for memtier output.
bvliu May 30, 2023
6743e8d
Add accept_licenses flag and throw warnings if accept_licenses flag i…
raymond13513 May 30, 2023
461ba43
Skip parsing incomplete lines in memtier histogram.
bvliu May 30, 2023
014d3c5
Add redis-cli package.
bvliu May 30, 2023
3b4249c
Merged OCI provider into new master
spacedan May 31, 2023
8ec3af9
Disinherit Ubuntu2004 from Ubuntu1804.
andyz422 Jun 1, 2023
6e770ea
Update Dataproc Serverless price table.
dorellang Jun 1, 2023
1733f57
Add a cloud_redis_zones flag to managed_memory_store to support clust…
bvliu Jun 1, 2023
52f4c55
Replace the use of `timeout_exception` in the `vm_util` function retr…
Jun 1, 2023
017de41
Use apt-get install stress-ng.
andyz422 Jun 1, 2023
6081256
Failed LM if the RobusRemoteCommand for LM Notificaiton timeout
raymond13513 Jun 2, 2023
ff2f0bb
Rerun the installation of CUDA and Nvidia drivers if the first attemp…
tohaowu Jun 5, 2023
63d8b9e
Support measuring distribution of runs in memtier for latency capped …
bvliu Jun 5, 2023
031528c
Fix typo (vm.InstallPackages('stress_ng') -> vm.InstallPackages('stre…
andyz422 Jun 6, 2023
8f5c89f
Change build examples for DPDK.
andyz422 Jun 6, 2023
7e140ac
Formatting fixes for ycsb.py.
bvliu Jun 6, 2023
509821a
Add BSD-3-Clause to LICENSES.
dlott Jun 6, 2023
a81b8dc
Separate YCSB stats parsers into a new module.
bvliu Jun 6, 2023
fcc696b
Add TLS support to memorystore cluster runs.
bvliu Jun 7, 2023
9043e39
Merge branch 'master' of github.com:GoogleCloudPlatform/PerfKitBenchm…
spacedan Jun 7, 2023
aabf476
Add default subnet to BaseNetworkSpec
neill-campbell Jun 14, 2023
9ab62f9
create allow port method
neill-campbell Jul 5, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGES.next.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### Breaking changes:

- Added --accept_licenses flag. User have to turn this flag on to acknowledge
that PKB may install software thereby accepting license agreements on the
user's behalf.
- Renamed Database-related flags from managed_db* to db* Added alias for
backwards compatibility, might not be supported in the future release.
- Require Python 3.9+
Expand Down Expand Up @@ -46,6 +48,7 @@
- Remove flag fio_write_against_multiple_clients from FIO.
- Drop windows coremark benchmark.
- Remove cudnn linux package.
- Make Ubuntu 20 the default os_type.

### New features:

Expand Down
36 changes: 36 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,39 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

---

Files: data/blaze_config.j2, data/blazemark_config.j2
#==================================================================================================
#
# Configfile file for the Blaze library
#
# Copyright (C) 2013 Klaus Iglberger - All Rights Reserved
#
# This file is part of the Blaze library. You can redistribute it and/or modify it under
# the terms of the New (Revised) BSD License. Redistribution and use in source and binary
# forms, with or without modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of
# conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice, this list
# of conditions and the following disclaimer in the documentation and/or other materials
# provided with the distribution.
# 3. Neither the names of the Blaze development group nor the names of its contributors
# may be used to endorse or promote products derived from this software without specific
# prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT
# SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
# TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.
#
#==================================================================================================
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ as part of a benchmark run. Therefore you must accept the license of each of the
benchmarks individually, and take responsibility for using them before you use
the PerfKit Benchmarker.

Moving forward, you will need to run PKB with the explicit flag --accept-licenses.

In its current release these are the benchmarks that are executed:

- `aerospike`:
Expand Down
8 changes: 8 additions & 0 deletions perfkitbenchmarker/configs/benchmark_config_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,14 @@ def _GetOptionDecoderConstructions(cls):
'default': None,
'none_ok': True
}),
'dataproc_serverless_memory': (option_decoders.IntDecoder, {
'default': None,
'none_ok': True
}),
'dataproc_serverless_memory_overhead': (option_decoders.IntDecoder, {
'default': None,
'none_ok': True
}),
'emr_serverless_executor_count': (option_decoders.IntDecoder, {
'default': None,
'none_ok': True
Expand Down
17 changes: 17 additions & 0 deletions perfkitbenchmarker/configs/default_config_constants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ default_single_core: &default_single_core
machine_type: cx2-2x4
zone: us-south-1
image: null
OCI:
machine_type: VM.Standard.A1.Flex
zone: us-ashburn-1
image: null

# TODO: update the two core machines for more providers
default_dual_core: &default_dual_core
Expand Down Expand Up @@ -83,6 +87,10 @@ default_dual_core: &default_dual_core
image: null
Kubernetes:
image: null
OCI:
machine_type: VM.Standard.A1.Flex
zone: us-ashburn-1
image: null

# TODO(user): update the disk types below as more providers are
# updated for the disk types refactor.
Expand Down Expand Up @@ -138,6 +146,10 @@ default_500_gb: &default_500_gb
disk_type: standard
disk_size: 500
mount_point: /scratch
OCI:
disk_type: paravirtualized
disk_size: 500
mount_point: /scratch


# TODO(user): update the disk types below as more providers are
Expand Down Expand Up @@ -194,3 +206,8 @@ default_50_gb: &default_50_gb
disk_type: standard
disk_size: 50
mount_point: /scratch
OCI:
disk_type: paravirtualized
disk_size: 50
mount_point: /scratch

7 changes: 7 additions & 0 deletions perfkitbenchmarker/flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ def GetCurrentUser():
except KeyError:
return 'user_unknown'


flags.DEFINE_boolean(
'accept_licenses',
False,
'Acknowledge that PKB may install software thereby accepting license'
' agreements on the users behalf.',
)
flags.DEFINE_list('ssh_options', [], 'Additional options to pass to ssh.')
flags.DEFINE_boolean('use_ipv6', False, 'Whether to use ipv6 for ssh/scp.')
flags.DEFINE_list('benchmarks', ['cluster_boot'],
Expand Down
4 changes: 2 additions & 2 deletions perfkitbenchmarker/linux_benchmarks/apachebench_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@ class ApacheBenchRunMode(object):
description: Runs apachebench benchmark.
vm_groups:
client:
os_type: ubuntu1804
os_type: ubuntu2004
vm_spec: *default_single_core
vm_count: 1
server:
os_type: ubuntu1804
os_type: ubuntu2004
vm_spec: *default_single_core
"""
FLAGS = flags.FLAGS
Expand Down
105 changes: 81 additions & 24 deletions perfkitbenchmarker/linux_benchmarks/cloud_redis_memtier_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,14 @@
Spins up a cloud redis instance, runs memtier against it, then spins it down.
"""

import collections
from absl import flags
from absl import logging
from perfkitbenchmarker import background_tasks
from perfkitbenchmarker import configs
from perfkitbenchmarker import linux_virtual_machine
from perfkitbenchmarker import managed_memory_store
from perfkitbenchmarker import sample
from perfkitbenchmarker.linux_packages import memtier

FLAGS = flags.FLAGS
Expand All @@ -36,6 +40,9 @@
vm_count: 1
"""

_LinuxVm = linux_virtual_machine.BaseLinuxVirtualMachine
_ManagedRedis = managed_memory_store.BaseManagedMemoryStore


def GetConfig(user_config):
config = configs.LoadConfig(BENCHMARK_CONFIG, user_config, BENCHMARK_NAME)
Expand Down Expand Up @@ -90,6 +97,74 @@ def Prepare(benchmark_spec):
memtier.Load(vm, memory_store_ip, memory_store_port, password)


def _GetConnections(
vms: list[_LinuxVm], redis_instance: _ManagedRedis
) -> list[memtier.MemtierConnection]:
"""Gets a list of connections mapping client VMs to shards."""
if len(vms) == 1:
return [
memtier.MemtierConnection(
vms[0],
redis_instance.GetMemoryStoreIp(),
redis_instance.GetMemoryStorePort(),
)
]
# Spread shards by client VM (evenly distributed by zone) such that each
# client VM gets an equal number of shards in each zone.
connections = []
shards = redis_instance.GetShardEndpoints(vms[0])
shards_by_zone = collections.defaultdict(list)
for shard in shards:
shards_by_zone[shard.zone].append(shard)
shards_by_vm = collections.defaultdict(list)
for shards_list in shards_by_zone.values():
for shard_index, shard in enumerate(shards_list):
vm_index = shard_index % len(vms)
vm = vms[vm_index]
connections.append(memtier.MemtierConnection(vm, shard.ip, shard.port))
shards_by_vm[vm].append(shard)
logging.info('Shards by VM: %s', shards_by_vm)
return connections


def _MeasureMemtierDistribution(
redis_instance: _ManagedRedis,
vms: list[_LinuxVm],
) -> list[sample.Sample]:
"""Runs and reports stats across a series of memtier runs."""
connections = _GetConnections(vms, redis_instance)
return memtier.MeasureLatencyCappedThroughputDistribution(
connections,
redis_instance.GetMemoryStoreIp(),
redis_instance.GetMemoryStorePort(),
vms,
redis_instance.node_count,
redis_instance.GetMemoryStorePassword(),
)


def _Run(vms: list[_LinuxVm], redis_instance: _ManagedRedis):
"""Runs memtier based on provided flags."""
if memtier.MEMTIER_RUN_MODE.value == memtier.MemtierMode.MEASURE_CPU_LATENCY:
return memtier.RunGetLatencyAtCpu(redis_instance, vms)
if memtier.MEMTIER_LATENCY_CAPPED_THROUGHPUT.value:
if memtier.MEMTIER_DISTRIBUTION_ITERATIONS.value:
return _MeasureMemtierDistribution(redis_instance, vms)
return memtier.MeasureLatencyCappedThroughput(
vms[0],
redis_instance.node_count,
redis_instance.GetMemoryStoreIp(),
redis_instance.GetMemoryStorePort(),
redis_instance.GetMemoryStorePassword(),
)
return memtier.RunOverAllThreadsPipelinesAndClients(
vms,
redis_instance.GetMemoryStoreIp(),
[redis_instance.GetMemoryStorePort()],
redis_instance.GetMemoryStorePassword(),
)


def Run(benchmark_spec):
"""Run benchmark and collect samples.

Expand All @@ -101,30 +176,10 @@ def Run(benchmark_spec):
A list of sample.Sample instances.
"""
memtier_vms = benchmark_spec.vm_groups['clients']
samples = []
if memtier.MEMTIER_RUN_MODE.value == memtier.MemtierMode.MEASURE_CPU_LATENCY:
samples = memtier.RunGetLatencyAtCpu(
benchmark_spec.cloud_redis_instance, memtier_vms
)
elif memtier.MEMTIER_LATENCY_CAPPED_THROUGHPUT.value:
samples = memtier.MeasureLatencyCappedThroughput(
memtier_vms[0],
benchmark_spec.cloud_redis_instance.GetMemoryStoreIp(),
benchmark_spec.cloud_redis_instance.GetMemoryStorePort(),
benchmark_spec.cloud_redis_instance.GetMemoryStorePassword(),
)
else:
samples = memtier.RunOverAllThreadsPipelinesAndClients(
memtier_vms,
benchmark_spec.cloud_redis_instance.GetMemoryStoreIp(),
[benchmark_spec.cloud_redis_instance.GetMemoryStorePort()],
benchmark_spec.cloud_redis_instance.GetMemoryStorePassword(),
)

for sample in samples:
sample.metadata.update(
benchmark_spec.cloud_redis_instance.GetResourceMetadata()
)
redis_instance: _ManagedRedis = benchmark_spec.cloud_redis_instance
samples = _Run(memtier_vms, redis_instance)
for s in samples:
s.metadata.update(benchmark_spec.cloud_redis_instance.GetResourceMetadata())

return samples

Expand All @@ -140,4 +195,6 @@ def Cleanup(benchmark_spec):


def _Install(vm):
"""Installs necessary client packages."""
vm.Install('memtier')
vm.Install('redis_cli')
4 changes: 4 additions & 0 deletions perfkitbenchmarker/linux_benchmarks/cluster_boot_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,10 @@ def MeasureDelete(
List of Samples containing the delete times and an overall cluster delete
time.
"""
# Only measure VMs that have a delete time.
vms = [vm for vm in vms if vm.delete_start_time and vm.delete_end_time]
if not vms:
return []
# Collect a delete time from each VM.
delete_times = [vm.delete_end_time - vm.delete_start_time for vm in vms]
# Get the cluster delete time.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from perfkitbenchmarker import virtual_machine

from perfkitbenchmarker.linux_packages import hammerdb
from perfkitbenchmarker.providers.gcp import gcp_alloy_db # pylint: disable=unused-import

# MYSQL Config file path
MYSQL_CONFIG_PATH = '/etc/mysql/mysql.conf.d/mysqld.cnf'
Expand Down
7 changes: 4 additions & 3 deletions perfkitbenchmarker/linux_benchmarks/lmbench_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,10 @@ def _AddProcessorMetricSamples(lmbench_output, processor_metric_list, metadata,
regex = '%s: (.*)' % metric
value_unit = regex_util.ExtractGroup(regex, lmbench_output)
[value, unit] = value_unit.split(' ')
results.append(
sample.Sample('%s' % metric.replace('\\', ''), float(value), unit,
metadata))
if unit == 'microseconds':
results.append(
sample.Sample('%s' % metric.replace('\\', ''), float(value), unit,
metadata))


def _ParseOutput(lmbench_output):
Expand Down
8 changes: 4 additions & 4 deletions perfkitbenchmarker/linux_benchmarks/mlperf_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ def PrepareBenchmark(benchmark_spec, vm=None):
_UpdateBenchmarkSpecWithFlags(benchmark_spec)
vm = vm or benchmark_spec.vms[0]

has_gpu = nvidia_driver.CheckNvidiaGpuExists(vm)
if has_gpu:
vm.Install('cuda_toolkit')

if (bool(benchmark_spec.tpus) and nvidia_driver.CheckNvidiaGpuExists(vm)):
raise errors.Config.InvalidValue(
'Invalid configuration. GPUs and TPUs can not both present in the config.'
Expand Down Expand Up @@ -362,10 +366,6 @@ def PrepareRunner(benchmark_spec, vm=None):
else:
benchmark_spec.model_dir = '/tmp'

has_gpu = nvidia_driver.CheckNvidiaGpuExists(vm)
if has_gpu:
vm.Install('cuda_toolkit')

vm.Install('nvidia_docker')
docker.AddUser(vm)
vm.RemoteCommand('sudo usermod -aG docker $USER')
Expand Down
24 changes: 23 additions & 1 deletion perfkitbenchmarker/linux_benchmarks/netperf_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,18 @@ def RunNetperf(vm, benchmark_name, server_ips, num_streams):
if len(parsed_output) == 1:
# Only 1 netperf thread
throughput_sample, latency_samples, histogram = parsed_output[0]
return samples + [throughput_sample] + latency_samples
output_samples = samples + [throughput_sample] + latency_samples
# Create formatted output for TCP stream throughput metrics
if benchmark_name.upper() == 'TCP_STREAM':
output_samples.append(
sample.Sample(
throughput_sample.metric + '_1stream',
throughput_sample.value,
throughput_sample.unit,
throughput_sample.metadata,
)
)
return output_samples
else:
# Multiple netperf threads
# Unzip parsed output
Expand All @@ -527,6 +538,17 @@ def RunNetperf(vm, benchmark_name, server_ips, num_streams):
samples.append(
sample.Sample(f'{benchmark_name}_Throughput_{stat}', float(value),
throughput_unit, metadata))
# Create formatted output, following {benchmark_name}_Throughput_Xstream(s)
# for TCP stream throughput metrics
if benchmark_name.upper() == 'TCP_STREAM':
samples.append(
sample.Sample(
f'{benchmark_name}_Throughput_{len(parsed_output)}streams',
throughput_stats['total'],
throughput_unit,
metadata,
)
)
if enable_latency_histograms:
# Combine all of the latency histogram dictionaries
latency_histogram = collections.Counter()
Expand Down
Loading