GithubHelp home page GithubHelp logo

googlecloudplatform / perfkitbenchmarker Goto Github PK

View Code? Open in Web Editor NEW
1.9K 128.0 473.0 25.55 MB

PerfKit Benchmarker (PKB) contains a set of benchmarks to measure and compare cloud offerings. The benchmarks use default settings to reflect what most users will see. PerfKit Benchmarker is licensed under the Apache 2 license terms. Please make sure to read, understand and agree to the terms of the LICENSE and CONTRIBUTING files before proceeding.

Home Page: https://googlecloudplatform.github.io/PerfKitBenchmarker/

License: Apache License 2.0

Shell 1.04% Python 94.76% Lua 1.11% HTML 1.52% Dockerfile 0.07% R 0.01% Jinja 0.95% Tcl 0.20% PowerShell 0.32% BitBake 0.01%

perfkitbenchmarker's Introduction

PerfKit Benchmarker

PerfKit Benchmarker is an open effort to define a canonical set of benchmarks to measure and compare cloud offerings. It's designed to operate via vendor provided command line tools. The benchmark default settings are not tuned for any particular platform or instance type. These settings are recommended for consistency across services. Only in the rare case where there is a common practice like setting the buffer pool size of a database do we change any settings.

This README is designed to give you the information you need to get running with the benchmarker and the basics of working with the code. The wiki contains more detailed information:

Licensing

PerfKit Benchmarker provides wrappers and workload definitions around popular benchmark tools. We made it very simple to use and automate everything we can. It instantiates VMs on the Cloud provider of your choice, automatically installs benchmarks, and runs the workloads without user interaction.

Due to the level of automation you will not see prompts for software installed 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:

Some of the benchmarks invoked require Java. You must also agree with the following license:

SPEC CPU2006 benchmark setup cannot be automated. SPEC requires that users purchase a license and agree with their terms and conditions. PerfKit Benchmarker users must manually download cpu2006-1.2.iso from the SPEC website, save it under the perfkitbenchmarker/data folder (e.g. ~/PerfKitBenchmarker/perfkitbenchmarker/data/cpu2006-1.2.iso), and also supply a runspec cfg file (e.g. ~/PerfKitBenchmarker/perfkitbenchmarker/data/linux64-x64-gcc47.cfg). Alternately, PerfKit Benchmarker can accept a tar file that can be generated with the following steps:

  • Extract the contents of cpu2006-1.2.iso into a directory named cpu2006
  • Run cpu2006/install.sh
  • Copy the cfg file into cpu2006/config
  • Create a tar file containing the cpu2006 directory, and place it under the perfkitbenchmarker/data folder (e.g. ~/PerfKitBenchmarker/perfkitbenchmarker/data/cpu2006v1.2.tgz).

PerfKit Benchmarker will use the tar file if it is present. Otherwise, it will search for the iso and cfg files.

Getting Started

To quickly get started running PKB, follow one of our tutorials:

  • Beginner tutorial for an in-depth but beginner friendly look at PKB's architectures, flags, and even data visualization, using GCP's Cloud Shell & netperf benchmarks.
  • Docker tutorial to run PKB in just a few steps, using GCP & docker.
  • Continue reading below for installation & setup on all Clouds + discussion of many topics like flags, configurations, preprovisioned data, & how to make contributions.

Installation and Setup

Before you can run the PerfKit Benchmarker, you need account(s) on the cloud provider(s) you want to benchmark (see providers). You also need the software dependencies, which are mostly command line tools and credentials to access your accounts without a password. The following steps should help you get up and running with PKB.

Python 3

The recommended way to install and run PKB is in a virtualenv with the latest version of Python 3 (at least Python 3.9). Most Linux distributions and recent Mac OS X versions already have Python 3 installed at /usr/bin/python3.

If Python is not installed, you can likely install it using your distribution's package manager, or see the Python Download page.

python3 -m venv $HOME/my_virtualenv
source $HOME/my_virtualenv/bin/activate

Install PerfKit Benchmarker

Download the latest PerfKit Benchmarker release from GitHub. You can also clone the working version with:

$ cd $HOME
$ git clone https://github.com/GoogleCloudPlatform/PerfKitBenchmarker.git

Install Python library dependencies:

$ pip3 install -r $HOME/PerfKitBenchmarker/requirements.txt

You may need to install additional dependencies depending on the cloud provider you are using. For example, for AWS:

$ cd $HOME/PerfKitBenchmarker/perfkitbenchmarker/providers/aws
$ pip3 install -r requirements.txt

Preprovisioned data

Some benchmarks may require data to be preprovisioned in a cloud. To preprovision data, you will need to obtain the data and then upload it to that cloud. See more information below about which benchmarks require preprovisioned data and how to upload it to different clouds.

Running a Single Benchmark

PerfKit Benchmarker can run benchmarks both on Cloud Providers (GCP, AWS, Azure, DigitalOcean) as well as any "machine" you can SSH into.

Example run on GCP

$ ./pkb.py --project=<GCP project ID> --benchmarks=iperf --machine_type=f1-micro

Example run on AWS

$ cd PerfKitBenchmarker
$ ./pkb.py --cloud=AWS --benchmarks=iperf --machine_type=t2.micro

Example run on Azure

$ ./pkb.py --cloud=Azure --machine_type=Standard_A0 --benchmarks=iperf

Example run on IBMCloud

$ ./pkb.py --cloud=IBMCloud --machine_type=cx2-4x8 --benchmarks=iperf

Example run on AliCloud

$ ./pkb.py --cloud=AliCloud --machine_type=ecs.s2.large --benchmarks=iperf

Example run on DigitalOcean

$ ./pkb.py --cloud=DigitalOcean --machine_type=16gb --benchmarks=iperf

Example run on OpenStack

$ ./pkb.py --cloud=OpenStack --machine_type=m1.medium \
           --openstack_network=private --benchmarks=iperf

Example run on Kubernetes

$ ./pkb.py --cloud=Kubernetes --benchmarks=iperf --kubectl=/path/to/kubectl --kubeconfig=/path/to/kubeconfig --image=image-with-ssh-server  --ceph_monitors=10.20.30.40:6789,10.20.30.41:6789

Example run on Mesos

$ ./pkb.py --cloud=Mesos --benchmarks=iperf --marathon_address=localhost:8080 --image=image-with-ssh-server

Example run on CloudStack

./pkb.py --cloud=CloudStack --benchmarks=ping --cs_network_offering=DefaultNetworkOffering

Example run on Rackspace

$ ./pkb.py --cloud=Rackspace --machine_type=general1-2 --benchmarks=iperf

Example run on ProfitBricks

$ ./pkb.py --cloud=ProfitBricks --machine_type=Small --benchmarks=iperf

How to Run Windows Benchmarks

Install all dependencies as above and ensure that smbclient is installed on your system if you are running on a linux controller:

$ which smbclient
/usr/bin/smbclient

Now you can run Windows benchmarks by running with --os_type=windows. Windows has a different set of benchmarks than Linux does. They can be found under perfkitbenchmarker/windows_benchmarks/. The target VM OS is Windows Server 2012 R2.

How to Run Benchmarks with Juju

Juju is a service orchestration tool that enables you to quickly model, configure, deploy and manage entire cloud environments. Supported benchmarks will deploy a Juju-modeled service automatically, with no extra user configuration required, by specifying the --os_type=juju flag.

Example

$ ./pkb.py --cloud=AWS --os_type=juju --benchmarks=cassandra_stress

Benchmark support

Benchmark/Package authors need to implement the JujuInstall() method inside their package. This method deploys, configures, and relates the services to be benchmarked. Please note that other software installation and configuration should be bypassed when FLAGS.os_type == JUJU. See perfkitbenchmarker/linux_packages/cassandra.py for an example implementation.

How to Run All Standard Benchmarks

Run with --benchmarks="standard_set" and every benchmark in the standard set will run serially which can take a couple of hours. Additionally, if you don't specify --cloud=..., all benchmarks will run on the Google Cloud Platform.

How to Run All Benchmarks in a Named Set

Named sets are are groupings of one or more benchmarks in the benchmarking directory. This feature allows parallel innovation of what is important to measure in the Cloud, and is defined by the set owner. For example the GoogleSet is maintained by Google, whereas the StanfordSet is managed by Stanford. Once a quarter a meeting is held to review all the sets to determine what benchmarks should be promoted to the standard_set. The Standard Set is also reviewed to see if anything should be removed. To run all benchmarks in a named set, specify the set name in the benchmarks parameter (e.g., --benchmarks="standard_set"). Sets can be combined with individual benchmarks or other named sets.

Useful Global Flags

The following are some common flags used when configuring PerfKit Benchmarker.

Flag Notes
--helpmatch=pkb see all global flags
--helpmatch=hpcc see all flags associated with the hpcc benchmark. You
: : can substitute any benchmark name to see the :
: : associated flags. :
--benchmarks A comma separated list of benchmarks or benchmark
: : sets to run such as --benchmarks=iperf,ping . To :
: : see the full list, run `./pkb.py :
: : --helpmatch=benchmarks grep perfkitbenchmarker` :
--cloud Cloud where the benchmarks are run. See the table
: : below for choices. :
--machine_type Type of machine to provision if pre-provisioned
: : machines are not used. Most cloud providers accept :
: : the names of pre-defined provider-specific machine :
: : types (for example, GCP supports :
: : --machine_type=n1-standard-8 for a GCE :
: : n1-standard-8 VM). Some cloud providers support YAML :
: : expressions that match the corresponding VM spec :
: : machine_type property in the [YAML :
: : configs](#configurations-and-configuration-overrides) :
: : (for example, GCP supports `--machine_type="{cpus: :
: : 1, memory: 4.5GiB}"` for a GCE custom VM with 1 vCPU :
: : and 4.5GiB memory). Note that the value provided by :
: : this flag will affect all provisioned machines; users :
: : who wish to provision different machine types for :
: : different roles within a single benchmark run should :
: : use the [YAML :
: : configs](#configurations-and-configuration-overrides) :
: : for finer control. :
--zones This flag allows you to override the default zone.
: : See the table below. :
--data_disk_type Type of disk to use. Names are provider-specific, but
: : see table below. :

The default cloud is 'GCP', override with the --cloud flag. Each cloud has a default zone which you can override with the --zones flag, the flag supports the same values that the corresponding Cloud CLIs take:

Cloud name Default zone Notes
GCP us-central1-a
AWS us-east-1a
Azure eastus2
IBMCloud us-south-1
AliCloud West US
DigitalOcean sfo1 You must use a zone that supports the
: : : features 'metadata' (for cloud config) and :
: : : 'private_networking'. :
OpenStack nova
CloudStack QC-1
Rackspace IAD OnMetal machine-types are available only in
: : : IAD zone :
Kubernetes k8s
ProfitBricks AUTO Additional zones: ZONE_1, ZONE_2, or ZONE_3

Example:

./pkb.py --cloud=GCP --zones=us-central1-a --benchmarks=iperf,ping

The disk type names vary by provider, but the following table summarizes some useful ones. (Many cloud providers have more disk types beyond these options.)

Cloud name Network-attached SSD Network-attached HDD
GCP pd-ssd pd-standard
AWS gp3 st1
Azure Premium_LRS Standard_LRS
Rackspace cbs-ssd cbs-sata

Also note that --data_disk_type=local tells PKB not to allocate a separate disk, but to use whatever comes with the VM. This is useful with AWS instance types that come with local SSDs, or with the GCP --gce_num_local_ssds flag.

If an instance type comes with more than one disk, PKB uses whichever does not hold the root partition. Specifically, on Azure, PKB always uses /dev/sdb as its scratch device.

Proxy configuration for VM guests.

If the VM guests do not have direct Internet access in the cloud environment, you can configure proxy settings through pkb.py flags.

To do that simple setup three flags (All urls are in notation ): The flag values use the same <protocol>://<server>:<port> syntax as the corresponding environment variables, for example --http_proxy=http://proxy.example.com:8080 .

Flag Notes
--http_proxy Needed for package manager on Guest OS and for some
: : Perfkit packages :
--https_proxy Needed for package manager or Ubuntu guest and for from
: : github downloaded packages :
--ftp_proxy Needed for some Perfkit packages

Preprovisioned Data

As mentioned above, some benchmarks require preprovisioned data. This section describes how to preprovision this data.

Benchmarks with Preprovisioned Data

Sample Preprovision Benchmark

This benchmark demonstrates the use of preprovisioned data. Create the following file to upload using the command line:

echo "1234567890" > preprovisioned_data.txt

To upload, follow the instructions below with a filename of preprovisioned_data.txt and a benchmark name of sample.

Clouds with Preprovisioned Data

Google Cloud

To preprovision data on Google Cloud, you will need to upload each file to Google Cloud Storage using gsutil. First, you will need to create a storage bucket that is accessible from VMs created in Google Cloud by PKB. Then copy each file to this bucket using the command

gsutil cp <filename> gs://<bucket>/<benchmark-name>/<filename>

To run a benchmark on Google Cloud that uses the preprovisioned data, use the flag --gcp_preprovisioned_data_bucket=<bucket>.

AWS

To preprovision data on AWS, you will need to upload each file to S3 using the AWS CLI. First, you will need to create a storage bucket that is accessible from VMs created in AWS by PKB. Then copy each file to this bucket using the command

aws s3 cp <filename> s3://<bucket>/<benchmark-name>/<filename>

To run a benchmark on AWS that uses the preprovisioned data, use the flag --aws_preprovisioned_data_bucket=<bucket>.

Configurations and Configuration Overrides

Each benchmark now has an independent configuration which is written in YAML. Users may override this default configuration by providing a configuration. This allows for much more complex setups than previously possible, including running benchmarks across clouds.

A benchmark configuration has a somewhat simple structure. It is essentially just a series of nested dictionaries. At the top level, it contains VM groups. VM groups are logical groups of homogenous machines. The VM groups hold both a vm_spec and a disk_spec which contain the parameters needed to create members of that group. Here is an example of an expanded configuration:

hbase_ycsb:
  vm_groups:
    loaders:
      vm_count: 4
      vm_spec:
        GCP:
          machine_type: n1-standard-1
          image: ubuntu-16-04
          zone: us-central1-c
        AWS:
          machine_type: m3.medium
          image: ami-######
          zone: us-east-1a
        # Other clouds here...
      # This specifies the cloud to use for the group. This allows for
      # benchmark configurations that span clouds.
      cloud: AWS
      # No disk_spec here since these are loaders.
    master:
      vm_count: 1
      cloud: GCP
      vm_spec:
        GCP:
          machine_type:
            cpus: 2
            memory: 10.0GiB
          image: ubuntu-16-04
          zone: us-central1-c
        # Other clouds here...
      disk_count: 1
      disk_spec:
        GCP:
          disk_size: 100
          disk_type: standard
          mount_point: /scratch
        # Other clouds here...
    workers:
      vm_count: 4
      cloud: GCP
      vm_spec:
        GCP:
          machine_type: n1-standard-4
          image: ubuntu-16-04
          zone: us-central1-c
        # Other clouds here...
      disk_count: 1
      disk_spec:
        GCP:
          disk_size: 500
          disk_type: remote_ssd
          mount_point: /scratch
        # Other clouds here...

For a complete list of keys for vm_specs and disk_specs see virtual_machine.BaseVmSpec and disk.BaseDiskSpec and their derived classes.

User configs are applied on top of the existing default config and can be specified in two ways. The first is by supplying a config file via the --benchmark_config_file flag. The second is by specifying a single setting to override via the --config_override flag.

A user config file only needs to specify the settings which it is intended to override. For example if the only thing you want to do is change the number of VMs for the cluster_boot benchmark, this config is sufficient:

cluster_boot:
  vm_groups:
    default:
      vm_count: 100

You can achieve the same effect by specifying the --config_override flag. The value of the flag should be a path within the YAML (with keys delimited by periods), an equals sign, and finally the new value:

--config_override=cluster_boot.vm_groups.default.vm_count=100

See the section below for how to use static (i.e. pre-provisioned) machines in your config.

Advanced: How To Run Benchmarks Without Cloud Provisioning (e.g., local workstation)

It is possible to run PerfKit Benchmarker without running the Cloud provisioning steps. This is useful if you want to run on a local machine, or have a benchmark like iperf run from an external point to a Cloud VM.

In order to do this you need to make sure:

  • The static (i.e. not provisioned by PerfKit Benchmarker) machine is ssh'able
  • The user PerfKitBenchmarker will login as has 'sudo' access. (*** Note we hope to remove this restriction soon ***)

Next, you will want to create a YAML user config file describing how to connect to the machine as follows:

static_vms:
  - &vm1 # Using the & character creates an anchor that we can
         # reference later by using the same name and a * character.
    ip_address: 170.200.60.23
    user_name: voellm
    ssh_private_key: /home/voellm/perfkitkeys/my_key_file.pem
    zone: Siberia
    disk_specs:
      - mount_point: /data_dir
  • The ip_address is the address where you want benchmarks to run.
  • ssh_private_key is where to find the private ssh key.
  • zone can be anything you want. It is used when publishing results.
  • disk_specs is used by all benchmarks which use disk (i.e., fio, bonnie++, many others).

In the same file, configure any number of benchmarks (in this case just iperf), and reference the static VM as follows:

iperf:
  vm_groups:
    vm_1:
      static_vms:
        - *vm1

I called my file iperf.yaml and used it to run iperf from Siberia to a GCP VM in us-central1-f as follows:

$ ./pkb.py --benchmarks=iperf --machine_type=f1-micro --benchmark_config_file=iperf.yaml --zones=us-central1-f --ip_addresses=EXTERNAL
  • ip_addresses=EXTERNAL tells PerfKit Benchmarker not to use 10.X (ie Internal) machine addresses that all Cloud VMs have. Just use the external IP address.

If a benchmark requires two machines like iperf, you can have two machines in the same YAML file as shown below. This means you can indeed run between two machines and never provision any VMs in the Cloud.

static_vms:
  - &vm1
    ip_address: <ip1>
    user_name: connormccoy
    ssh_private_key: /home/connormccoy/.ssh/google_compute_engine
    internal_ip: 10.240.223.37
    install_packages: false
  - &vm2
    ip_address: <ip2>
    user_name: connormccoy
    ssh_private_key: /home/connormccoy/.ssh/google_compute_engine
    internal_ip: 10.240.234.189
    ssh_port: 2222

iperf:
  vm_groups:
    vm_1:
      static_vms:
        - *vm2
    vm_2:
      static_vms:
        - *vm1

Specifying Flags in Configuration Files

You can now specify flags in configuration files by using the flags key at the top level in a benchmark config. The expected value is a dictionary mapping flag names to their new default values. The flags are only defaults; it's still possible to override them via the command line. It's even possible to specify conflicting values of the same flag in different benchmarks:

iperf:
  flags:
    machine_type: n1-standard-2
    zone: us-central1-b
    iperf_sending_thread_count: 2

netperf:
  flags:
    machine_type: n1-standard-8

The new defaults will only apply to the benchmark in which they are specified.

Using Elasticsearch Publisher

PerfKit data can optionally be published to an Elasticsearch server. To enable this, the elasticsearch Python package must be installed.

$ pip install elasticsearch

Note: The elasticsearch Python library and Elasticsearch must have matching major versions.

The following are flags used by the Elasticsearch publisher. At minimum, all that is needed is the --es_uri flag.

Flag Notes
--es_uri The Elasticsearch server address and port (e.g.
: : localhost:9200) :
--es_index The Elasticsearch index name to store documents (default:
: : perfkit) :
--es_type The Elasticsearch document type (default: result)

Note: Amazon ElasticSearch service currently does not support transport on port 9200 therefore you must use endpoint with port 80 eg. search-<ID>.es.amazonaws.com:80 and allow your IP address in the cluster.

Using InfluxDB Publisher

No additional packages need to be installed in order to publish Perfkit data to an InfluxDB server.

InfluxDB Publisher takes in the flags for the Influx uri and the Influx DB name. The publisher will default to the pre-set defaults, identified below, if no uri or DB name is set. However, the user is required to at the very least call the --influx_uri flag to publish data to Influx.

Flag Notes Default
--influx_uri The Influx DB address and port. localhost:8086
: : Expects the format hostname:port : :
--influx_db_name The name of Influx DB database that perfkit
: : you wish to publish to or create : :

How to Extend PerfKit Benchmarker

First start with the CONTRIBUTING.md file. It has the basics on how to work with PerfKitBenchmarker, and how to submit your pull requests.

In addition to the CONTRIBUTING.md file we have added a lot of comments into the code to make it easy to:

  • Add new benchmarks (e.g.: --benchmarks=<new benchmark>)
  • Add new package/os type support (e.g.: --os_type=<new os type>)
  • Add new providers (e.g.: --cloud=<new provider>)
  • etc.

Even with lots of comments we make to support more detailed documention. You will find the documentation we have on the wiki. Missing documentation you want? Start a page and/or open an issue to get it added.

Integration Testing

If you wish to run unit or integration tests, ensure that you have tox >= 2.0.0 installed.

In addition to regular unit tests, which are run via hooks/check-everything, PerfKit Benchmarker has integration tests, which create actual cloud resources and take time and money to run. For this reason, they will only run when the variable PERFKIT_INTEGRATION is defined in the environment. The command

$ tox -e integration

will run the integration tests. The integration tests depend on having installed and configured all of the relevant cloud provider SDKs, and will fail if you have not done so.

Planned Improvements

Many... please add new requests via GitHub issues.

perfkitbenchmarker's People

Contributors

andyz422 avatar asaksena avatar bvliu avatar cmccoy avatar cwilkes avatar dlott avatar dorellang avatar dphanekham avatar ehankland avatar flint-dominic avatar gareth-ferneyhough avatar hildrum avatar jellyfishcake avatar jerlawson avatar kivio avatar klausw avatar mateusz-blaszkowski avatar meteorfox avatar nathanteeuwen avatar noahl avatar pmkc avatar raymond13513 avatar s-deitz avatar shyamsabhaya avatar skschneider avatar stfeng2 avatar tedsta avatar tohaowu avatar voellm avatar yuyantingzero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

perfkitbenchmarker's Issues

PerfKit Benchmarker is failing on new AWS C4 instance types

It looks like the issue is related to the lookup of disks in aws_virtual_machine.py

When looking for NUM_LOCAL_VOLUMES for code should default to 0 rather than throw an exception.

The quick fix is to add the C4 types to NUM_LOCAL_VOLUMES. The whole fix is to also fix all the places that use NUM_LOCAL_VOLUMES to handle the cause of an instance type that is not listed.

My plan is to fix the first part of adding the new instance types. Eric is planning on doing the default to 0 fix.

Collect CPUINFO has part of runs

Today we collect some uname info but not cpu info. It would be good to know the feature sets, etc the benchmarks are running on.

Error during benchmark iperf

Receiving the following error while running PerfKitBenchmarker iperf.Please advise on the resolution

ubuntu@ip-172-30-0-134:/GPerfKitB/PerfKitBenchmarker$ clear
ubuntu@ip-172-30-0-134:
/GPerfKitB/PerfKitBenchmarker$ ./pkb.py --cloud=AWS --benchmarks=iperf --machine_type=t1.micro
2015-02-16 05:11:09,800 INFO Verbose logging to: /tmp/perfkitbenchmarker/run_569a6928/pkb.log
2015-02-16 05:11:09,910 INFO Preparing benchmark iperf
2015-02-16 05:11:09,911 INFO Running: aws ec2 create-vpc --region=us-east-1 --cidr-block=10.0.0.0/16
2015-02-16 05:11:10,426 ERROR Error during benchmark iperf
Traceback (most recent call last):
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/pkb.py", line 228, in RunBenchmark
benchmark_specification.Prepare()
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/benchmark_spec.py", line 185, in Prepare
vm_util.RunThreaded(self.PrepareNetwork, prepare_args)
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 249, in RunThreaded
'\n'.join([stacktrace for stacktrace in exceptions]))
ThreadException: The following exceptions occurred during threaded execution: Traceback (most recent call last):
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 236, in RunThreaded
thread.join(1000) # Set timeout so that join is interruptable.
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 179, in join
raise errors.VmUtil.ThreadException(self.exception)
ThreadException: Exception occured in thread 139723530974976:
Traceback (most recent call last):
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 166, in run
self.RunWithExceptions()
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 173, in RunWithExceptions
super(ThreadWithExceptions, self).run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.**target(_self.__args, _self.__kwargs)
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/benchmark_spec.py", line 202, in PrepareNetwork
network.Create()
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/aws/aws_network.py", line 339, in Create
self.vpc.Create()
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/resource.py", line 113, in Create
self._CreateResource()
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 306, in WrappedFunction
return f(_args, _kwargs)
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/resource.py", line 87, in _CreateResource
self._Create()
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/aws/aws_network.py", line 104, in _Create
response = json.loads(stdout)
File "/usr/lib/python2.7/json/__init
.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

2015-02-16 05:11:10,428 INFO Running: aws ec2 --region=us-east-1 delete-key-pair --key-name=perfkit-key-569a6928
Traceback (most recent call last):
File "./pkb.py", line 21, in
sys.exit(Main())
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/pkb.py", line 358, in Main
return RunBenchmarks()
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/pkb.py", line 324, in RunBenchmarks
RunBenchmark(benchmark, collector)
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/pkb.py", line 228, in RunBenchmark
benchmark_specification.Prepare()
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/benchmark_spec.py", line 185, in Prepare
vm_util.RunThreaded(self.PrepareNetwork, prepare_args)
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 249, in RunThreaded
'\n'.join([stacktrace for stacktrace in exceptions]))
perfkitbenchmarker.errors.ThreadException: The following exceptions occurred during threaded execution: Traceback (most recent call last):
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 236, in RunThreaded
thread.join(1000) # Set timeout so that join is interruptable.
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 179, in join
raise errors.VmUtil.ThreadException(self.exception)
ThreadException: Exception occured in thread 139723530974976:
Traceback (most recent call last):
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 166, in run
self.RunWithExceptions()
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 173, in RunWithExceptions
super(ThreadWithExceptions, self).run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.**target(_self.__args, _self.__kwargs)
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/benchmark_spec.py", line 202, in PrepareNetwork
network.Create()
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/aws/aws_network.py", line 339, in Create
self.vpc.Create()
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/resource.py", line 113, in Create
self._CreateResource()
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 306, in WrappedFunction
return f(_args, _kwargs)
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/resource.py", line 87, in _CreateResource
self._Create()
File "/home/ubuntu/GPerfKitB/PerfKitBenchmarker/perfkitbenchmarker/aws/aws_network.py", line 104, in _Create
response = json.loads(stdout)
File "/usr/lib/python2.7/json/__init
.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

The cluster boot benchmark should the num_cpus function in parallel

The cluster boot benchmark has the following code:

for vm in vms:
metadata = {'machine_type': vm.machine_type, 'num_cpus': vm.num_cpus,
'machine_instance': vm_number}
value = vm.TimeToBoot()

This looks great until you realize vm.num_cpus is a method on the virtual machine which in turn calls RemoteCommand leading to an ssh. When large number of VM's boot the result is a long set of serially run ssh's to each VM. This could be done a lot faster by moving the code into a method and then using RunThreaded.

Outdated/broken image on Azure

PerfkitBenchmarker has not updated its images used by vms for a while, causing some software installation problems, especially on Azure.

When trying to install openjdk-7-jdk, I get following errors.

2015-01-27 17:26:36,504 ERROR Got exception running InstallPackages: Got non-zero return code (100) executing sudo DEBIAN_FRONTEND='noninteractive' /usr/bi
n/apt-get -y install openjdk-7-jdk
Full command: /usr/bin/ssh -A -p 22 [email protected] -2 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PreferredAut
hentications=publickey -o PasswordAuthentication=no -o ConnectTimeout=5 -o GSSAPIAuthentication=no -o ServerAliveInterval=30 -o ServerAliveCountMax=10 -i /tmp
/perfkitbenchmarker/run_fdf1048d/perfkitbenchmarker_keyfile sudo DEBIAN_FRONTEND='noninteractive' /usr/bin/apt-get -y install openjdk-7-jdk
STDOUT: Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
openjdk-7-jdk : Depends: openjdk-7-jre (= 7u71-2.5.3-0ubuntu0.14.04.1) but it is not going to be installed
Recommends: libxt-dev but it is not installable
STDERR: Warning: Permanently added '191.237.18.89' (ECDSA) to the list of known hosts.
E: Unable to correct problems, you have held broken packages.

Consider moving the SPEC CPU runs to use LongRunningRemoteCommand

For commands that take hours to days there are issues that can arise when connection failures happen. Today SPEC is running on an active connection vs HPCC which is using nohup an logging out.

We should consider moving

vm.RemoteCommand('cd %s; . ./shrc; ./bin/relocate; . ./shrc; rm -rf result; '
'runspec --config=linux64-x64-gcc47.cfg --tune=base '
'--size=ref --noreportable -rate %s %s '
% (vm.spec_dir, num_cpus, FLAGS.benchmark_subset))

To use the vm.LongRunningRemoteCommand.

Cassandra Benchmark Missing Quotes

Test Provider: Google Compute Engine
Test VM: n1-standard-1 (by default)
The file: cassandra_benchmark.py
Affected Lines: 145, 148, 151, and 154

In the function ConfigureCassandraEnvScript(), trying to invoke the following line of code:

echo "JVM_OPTS=\"\\$JVM_OPTS -XX:+UseLargePages\""

But the input received by the VM is:

JVM_OPTS=$JVM_OPTS -XX:+UseLargePages

instead of what we assume it should be, which is :

JVM_OPTS="$JVM_OPTS -XX:+UseLargePages"

It will still continue to run, but the Shell interprets -XX as a command and says

-XX: command not found

No way to specify SSD disks on GCE

In AWS and Azure, the type of storage (standard vs. ssd) is baked into the instance type. On GCE, you specify the type of disk you want to backend your VM at creation. There needs to be a parameter for starting GCE benchmarks backended by SSD disks.

Broken pipe error when running object_storage_service benchmark

Hi,
Has anyone seen this error, Broken pipe, during benchmark object_storage_service?
./pkb.py --project=elite-firefly-786 --benchmarks=object_storage_service --machine_type=n1-standard-2
pkb.log
...
2015-02-25 21:38:46,569 vm_util.py:335 INFO Running: /usr/bin/ssh -A -p 22 [email protected] -2 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PreferredAuthentications=publickey -o PasswordAuthentication=no -o ConnectTimeout=5 -o GSSAPIAuthentication=no -o ServerAliveInterval=30 -o ServerAliveCountMax=10 -i /tmp/perfkitbenchmarker/run_fcd580f8/perfkitbenchmarker_keyfile /scratch0/run/object_storage_api_tests.py --bucket=pkbfcd580f8 --storage_provider=GCS --iterations=200 --scenario=ListConsistency
2015-02-26 01:34:05,081 vm_util.py:349 DEBUG Ran /usr/bin/ssh -A -p 22 [email protected] -2 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PreferredAuthentications=publickey -o PasswordAuthentication=no -o ConnectTimeout=5 -o GSSAPIAuthentication=no -o ServerAliveInterval=30 -o ServerAliveCountMax=10 -i /tmp/perfkitbenchmarker/run_fcd580f8/perfkitbenchmarker_keyfile /scratch0/run/object_storage_api_tests.py --bucket=pkbfcd580f8 --storage_provider=GCS --iterations=200 --scenario=ListConsistency. Got return code (0). STDOUT: STDERR: Warning: Permanently added '104.154.77.220' (ECDSA) to the list of known hosts.^M
โ€ฆ..
Final stats:
INFO:root:list-after-write consistency percentage: 87.000000
INFO:root:list-after-write inconsistency window: {"average": 39.82011866569519, "p1": 1.0820820331573486, "p5": 1.132835865020752, "p50": 5.805269002914429, "p90": 134.60191202163696, "p99": 283.1713089942932, "p99.9": 283.1713089942932, "stddev": 73.03022897677377}
INFO:root:list-after-write latency: {"average": 1.2659037058380829, "p1": 0.9758129119873047, "p5": 1.0399689674377441, "p50": 1.1664412021636963, "p90": 1.4518799781799316, "p99": 5.052584886550903, "p99.9": 5.406584978103638, "stddev": 0.4693329095847918}
INFO:root:list-after-update consistency percentage: 89.000000
INFO:root:list-after-update inconsistency window: {"average": 21.084003946997903, "p1": 1.2440087795257568, "p5": 1.4276509284973145, "p50": 8.543776035308838, "p90": 53.372872829437256, "p99": 147.42951703071594, "p99.9": 147.42951703071594, "stddev": 34.4644712034284}
INFO:root:list-after-update latency: {"average": 1.263827731100361, "p1": 0.9965829849243164, "p5": 1.017981767654419, "p50": 1.1851608753204346, "p90": 1.4783661365509033, "p99": 5.225747108459473, "p99.9": 5.397141933441162, "stddev": 0.4733233401719766}

2015-02-26 01:34:05,095 pkb.py:256 ERROR Error during benchmark object_storage_service
Traceback (most recent call last):
File "/root/PerfKitBenchmarker/perfkitbenchmarker/pkb.py", line 238, in RunBenchmark
samples = benchmark.Run(benchmark_specification)
File "/root/PerfKitBenchmarker/perfkitbenchmarker/benchmarks/object_storage_service_benchmark.py", line 806, in Run
print results
IOError: [Errno 32] Broken pipe
2015-02-26 01:34:05,096 vm_util.py:335 INFO Running: gcloud compute instances delete perfkit-fcd580f8-0 --project elite-firefly-786 --format json --quiet --zone us-central1-a
2015-02-26 01:34:37,261 vm_util.py:349 DEBUG Ran gcloud compute instances delete perfkit-fcd580f8-0 --project elite-firefly-786 --format json --quiet --zone us-central1-a. Got return code (0). STDOUT: []
STDERR: Deleted [https://www.googleapis.com/compute/v1/projects/elite-firefly-786/zones/us-central1-a/instances/perfkit-fcd580f8-0].

unixbench fails with multiple permisison/command not found error on centos6

test.json
[
 {"ip_address": "INTERNAL",
  "os_type": "rhel",
  "keyfile_path": "ME",
  "user_name": "ADMIN",
  "scratch_disk_mountpoints": "/tmp/google-pkb",
  "zone": "Siberia"}
]

./pkb.py --benchmarks=unixbench --machine_type=YOLO --static_vm_file=test.json --zone=YOLO --ip_addresses=EXTERNAL
make all
make[1]: Entering directory `/tmp/pkb/UnixBench'
Checking distribution of files
./pgms  exists
./src  exists
./testdir  exists
./results  exists
make[1]: Leaving directory `/tmp/pkb/UnixBench'

   #    #  #    #  #  #    #          #####   ######  #    #   ####   #    #
   #    #  ##   #  #   #  #           #    #  #       ##   #  #    #  #    #
   #    #  # #  #  #    ##            #####   #####   # #  #  #       ######
   #    #  #  # #  #    ##            #    #  #       #  # #  #       #    #
   #    #  #   ##  #   #  #           #    #  #       #   ##  #    #  #    #
    ####   #    #  #  #    #          #####   ######  #    #   ####   #    #

   Version 5.1.3                      Based on the Byte Magazine Unix Benchmark

   Multi-CPU version                  Version 5 revisions by Ian Smith,
                                      Sunnyvale, CA, USA
   January 13, 2011                   johantheghost at yahoo period com


1 x Dhrystone 2 using register variables  1 2 3 4 5 6 7 8 9 10

1 x Double-Precision Whetstone  1 2 3 4 5 6 7 8 9 10

1 x Execl Throughput  1 2 3

1 x File Copy 1024 bufsize 2000 maxblocks  1STDERR: Warning: Permanently added '10.15.14.242' (RSA) to the list of known hosts.
./src/syscall.c: In function main:
./src/syscall.c:93: warning: null argument where non-null required (argument 2)
sh: //kill_run: Permission denied
sh: 3dinfo: command not found
sh: runlevel: command not found

**********************************************
Run: "File Copy 1024 bufsize 2000 maxblocks": fstime: creat: Permission denied; aborting

allow scratch space to be an aribtirary directory

It would be useful to be able to run PerfKitBenchmarker on VMs/containers/physical-servers where there isn't a dedicated mount point for the scratch space, or where creating a mountpoint per service is not supported.

Currenlty trying to run fio with "scratch_disk_mountpoints": "/tmp/google-pkb" results in```
Traceback (most recent call last):
File "./pkb.py", line 21, in
sys.exit(Main())
File "/home/csb/prog/github/PerfKitBenchmarker/perfkitbenchmarker/pkb.py", line 358, in Main
return RunBenchmarks()
File "/home/csb/prog/github/PerfKitBenchmarker/perfkitbenchmarker/pkb.py", line 324, in RunBenchmarks
RunBenchmark(benchmark, collector)
File "/home/csb/prog/github/PerfKitBenchmarker/perfkitbenchmarker/pkb.py", line 229, in RunBenchmark
benchmark.Prepare(benchmark_specification)
File "/home/csb/prog/github/PerfKitBenchmarker/perfkitbenchmarker/benchmarks/fio_benchmark.py", line 65, in Prepare
disk_size_kb = vm.GetDeviceSizeFromPath(vm.GetScratchDir())
File "/home/csb/prog/github/PerfKitBenchmarker/perfkitbenchmarker/virtual_machine.py", line 405, in GetDeviceSizeFromPath
return int(stdout)
ValueError: invalid literal for int() with base 10: '210411904 16419404 '


While omitting results in the only marginally more helpful error message:

Traceback (most recent call last):
File "./pkb.py", line 21, in
sys.exit(Main())
File "/home/csb/prog/github/PerfKitBenchmarker/perfkitbenchmarker/pkb.py", line 358, in Main
return RunBenchmarks()
File "/home/csb/prog/github/PerfKitBenchmarker/perfkitbenchmarker/pkb.py", line 324, in RunBenchmarks
RunBenchmark(benchmark, collector)
File "/home/csb/prog/github/PerfKitBenchmarker/perfkitbenchmarker/pkb.py", line 229, in RunBenchmark
benchmark.Prepare(benchmark_specification)
File "/home/csb/prog/github/PerfKitBenchmarker/perfkitbenchmarker/benchmarks/fio_benchmark.py", line 65, in Prepare
disk_size_kb = vm.GetDeviceSizeFromPath(vm.GetScratchDir())
File "/home/csb/prog/github/PerfKitBenchmarker/perfkitbenchmarker/static_virtual_machine.py", line 91, in GetScratchDir
scratch_dir = self.scratch_disk_mountpoints[disk_num]
IndexError: list index out of range

Error resource not found when running cassandra benchmark

root@instance-1:~/PerfKitBenchmarker# ./pkb.py --project=elite-firefly-786 --benchmarks=cassandra --machine_type=n1-standard-2
2015-01-12 22:56:44,931 vm_util.py:344 DEBUG Ran gcloud compute instances describe perfkit-8da3b103-3 --project elite-firefly-786 --format json --quiet --zone us-central1-a. Got return code (1). STDOUT: STDERR: ERROR: (gcloud.compute.instances.describe) Could not fetch resource:

  • The resource 'projects/elite-firefly-786/zones/us-central1-a/instances/perfkit-8da3b103-3' was not found
    ...
    2015-01-12 22:56:21,184 INFO Authorizing loader[0] permission to access all other vms.
    2015-01-12 22:56:21,184 INFO Running: /usr/bin/scp -P 22 -pr -2 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PreferredAuthentications=publickey -o PasswordAuthentication=no -o ConnectTimeout=5 -o GSSAPIAuthentication=no -o ServerAliveInterval=30 -o ServerAliveCountMax=10 -i /tmp/perfkitbenchmarker/run_8da3b103/perfkitbenchmarker_keyfile /tmp/perfkitbenchmarker/run_8da3b103/perfkitbenchmarker_keyfile [email protected]:.ssh/id_rsa
    2015-01-12 22:56:21,502 INFO Preparing data files and Java on all vms.
    2015-01-12 22:56:21,503 WARNING File resource loader root data is not a directory.
    2015-01-12 22:56:21,505 WARNING File resource loader root data is not a directory.
    2015-01-12 22:56:21,505 WARNING File resource loader root data is not a directory.
    2015-01-12 22:56:21,506 WARNING File resource loader root data is not a directory.
    2015-01-12 22:56:21,507 ERROR Error during benchmark cassandra
    Traceback (most recent call last):
    File "/root/PerfKitBenchmarker/perfkitbenchmarker/pkb.py", line 219, in RunBenchmark
    benchmark.Prepare(benchmark_specification)
    File "/root/PerfKitBenchmarker/perfkitbenchmarker/benchmarks/cassandra_benchmark.py", line 116, in Prepare
    vm_util.RunThreaded(PrepareVm, benchmark_spec.vms)
    File "/root/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 244, in RunThreaded
    '\n'.join([stacktrace for stacktrace in exceptions]))
    ThreadException: The following exceptions occurred during threaded execution: Traceback (most recent call last):
    File "/root/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 231, in RunThreaded
    thread.join(1000) # Set timeout so that join is interruptable.
    File "/root/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 174, in join
    raise errors.VmUtil.ThreadException(self.exception)
    ThreadException: Exception occured in thread 140086647011072:
    Traceback (most recent call last):
    File "/root/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 161, in run
    self.RunWithExceptions()
    File "/root/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 168, in RunWithExceptions
    super(ThreadWithExceptions, self).run()
    File "/usr/lib/python2.7/threading.py", line 763, in run
    self.*target(_self.__args, _self.__kwargs)
    File "/root/PerfKitBenchmarker/perfkitbenchmarker/benchmarks/cassandra_benchmark.py", line 85, in PrepareVm
    vm.PushDataFile(CASSANDRA_TAR)
    File "/root/PerfKitBenchmarker/perfkitbenchmarker/virtual_machine.py", line 412, in PushDataFile
    file_path = data.ResourcePath(data_file)
    File "/root/PerfKitBenchmarker/perfkitbenchmarker/data/__init
    .py", line 166, in ResourcePath
    '{0} (Searched: {1})'.format(resource_name, loaders))
    ResourceNotFound: dsc.tar.gz (Searched: [, , ])

2015-01-12 22:56:21,508 INFO Running: gcloud compute instances delete perfkit-8da3b103-3 --project elite-firefly-786 --format json --quiet --zone us-central1-a
2015-01-12 22:56:21,510 INFO Running: gcloud compute instances delete perfkit-8da3b103-2 --project elite-firefly-786 --format json --quiet --zone us-central1-a
2015-01-12 22:56:21,513 INFO Running: gcloud compute instances delete perfkit-8da3b103-1 --project elite-firefly-786 --format json --quiet --zone us-central1-a
2015-01-12 22:56:21,514 INFO Running: gcloud compute instances delete perfkit-8da3b103-0 --project elite-firefly-786 --format json --quiet --zone us-central1-a
2015-01-12 22:56:43,988 INFO Running: gcloud compute instances describe perfkit-8da3b103-3 --project elite-firefly-786 --format json --quiet --zone us-central1-a
2015-01-12 22:56:44,030 INFO Running: gcloud compute instances describe perfkit-8da3b103-1 --project elite-firefly-786 --format json --quiet --zone us-central1-a
2015-01-12 22:56:44,932 INFO Running: gcloud compute disks delete perfkit-8da3b103-3 --project elite-firefly-786 --format json --quiet --zone us-central1-a
2015-01-12 22:56:45,012 INFO Running: gcloud compute disks delete perfkit-8da3b103-1 --project elite-firefly-786 --format json --quiet --zone us-central1-a
2015-01-12 22:56:49,132 INFO Running: gcloud compute instances describe perfkit-8da3b103-0 --project elite-firefly-786 --format json --quiet --zone us-central1-a
2015-01-12 22:56:49,268 INFO Running: gcloud compute instances describe perfkit-8da3b103-2 --project elite-firefly-786 --format json --quiet --zone us-central1-a
2015-01-12 22:56:50,064 INFO Running: gcloud compute disks delete perfkit-8da3b103-0 --project elite-firefly-786 --format json --quiet --zone us-central1-a
2015-01-12 22:56:50,196 INFO Running: gcloud compute disks delete perfkit-8da3b103-2 --project elite-firefly-786 --format json --quiet --zone us-central1-a
2015-01-12 22:56:52,505 INFO Running: gcloud compute disks describe perfkit-8da3b103-3 --project elite-firefly-786 --format json --quiet --zone us-central1-a
2015-01-12 22:56:52,598 INFO Running: gcloud compute disks describe perfkit-8da3b103-1 --project elite-firefly-786 --format json --quiet --zone us-central1-a
2015-01-12 22:56:53,495 INFO Running: gcloud compute disks delete perfkit-8da3b103-1-scratch-0 --project elite-firefly-786 --format json --quiet --zone us-central1-a
2015-01-12 22:56:57,530 INFO Running: gcloud compute disks describe perfkit-8da3b103-0 --project elite-firefly-786 --format json --quiet --zone us-central1-a
2015-01-12 22:56:57,653 INFO Running: gcloud compute disks describe perfkit-8da3b103-2 --project elite-firefly-786 --format json --quiet --zone us-central1-a
2015-01-12 22:56:58,441 INFO Running: gcloud compute disks delete perfkit-8da3b103-0-scratch-0 --project elite-firefly-786 --format json --quiet --zone us-central1-a
2015-01-12 22:56:58,554 INFO Running: gcloud compute disks delete perfkit-8da3b103-2-scratch-0 --project elite-firefly-786 --format json --quiet --zone us-central1-a
2015-01-12 22:57:00,714 INFO Running: gcloud compute disks describe perfkit-8da3b103-1-scratch-0 --project elite-firefly-786 --format json --quiet --zone us-central1-a
2015-01-12 22:57:06,011 INFO Running: gcloud compute disks describe perfkit-8da3b103-0-scratch-0 --project elite-firefly-786 --format json --quiet --zone us-central1-a
2015-01-12 22:57:06,080 INFO Running: gcloud compute disks describe perfkit-8da3b103-2-scratch-0 --project elite-firefly-786 --format json --quiet --zone us-central1-a
2015-01-12 22:57:07,007 INFO Running: gcloud compute firewall-rules delete perfkit-firewall-8da3b103-22 --project elite-firefly-786 --format json --quiet
Traceback (most recent call last):
File "./pkb.py", line 21, in
sys.exit(Main())
File "/root/PerfKitBenchmarker/perfkitbenchmarker/pkb.py", line 340, in Main
return RunBenchmarks()
File "/root/PerfKitBenchmarker/perfkitbenchmarker/pkb.py", line 314, in RunBenchmarks
RunBenchmark(benchmark, collector)
File "/root/PerfKitBenchmarker/perfkitbenchmarker/pkb.py", line 219, in RunBenchmark
benchmark.Prepare(benchmark_specification)
File "/root/PerfKitBenchmarker/perfkitbenchmarker/benchmarks/cassandra_benchmark.py", line 116, in Prepare
vm_util.RunThreaded(PrepareVm, benchmark_spec.vms)
File "/root/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 244, in RunThreaded
'\n'.join([stacktrace for stacktrace in exceptions]))
perfkitbenchmarker.errors.ThreadException: The following exceptions occurred during threaded execution: Traceback (most recent call last):
File "/root/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 231, in RunThreaded
thread.join(1000) # Set timeout so that join is interruptable.
File "/root/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 174, in join
raise errors.VmUtil.ThreadException(self.exception)
ThreadException: Exception occured in thread 140086647011072:
Traceback (most recent call last):
File "/root/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 161, in run
self.RunWithExceptions()
File "/root/PerfKitBenchmarker/perfkitbenchmarker/vm_util.py", line 168, in RunWithExceptions
super(ThreadWithExceptions, self).run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.*target(_self.__args, _self.__kwargs)
File "/root/PerfKitBenchmarker/perfkitbenchmarker/benchmarks/cassandra_benchmark.py", line 85, in PrepareVm
vm.PushDataFile(CASSANDRA_TAR)
File "/root/PerfKitBenchmarker/perfkitbenchmarker/virtual_machine.py", line 412, in PushDataFile
file_path = data.ResourcePath(data_file)
File "/root/PerfKitBenchmarker/perfkitbenchmarker/data/__init
.py", line 166, in ResourcePath
'{0} (Searched: {1})'.format(resource_name, loaders))
ResourceNotFound: dsc.tar.gz (Searched: [, , ])

Cassandra Benchmark VM Provisioning Problem Due to Exceeded Quota

Just noted as an FYI, if you already have other VMs running in your Google Project and you try to run Cassandra with the included config file, you might hit resource limitation issues, as it requires 4 n1-standard-8 virtual machines. If you try to run the script, it will just return the following error message:

ERROR:root:Got exception running _CreateResource: Creation of GceVirtualMachine failed.

and retry the VM build. And again.

So if you are running into VM provisioning issues on some tests like Cassandra, but the VMs were provisioning just fine a while ago for other tests, then it might be a resource limitation you're bumping into.

The iperf text results dont label the internal and external IP results

When the final results come out of iperf on the command line the results dont differentiate the internal and external IP results. You can likely tell from the diff in performance but we should be explicit.

This may also hold for the network benchmarks.

The detailed JSON block does including the right information so it should be a matter of updating the output text to be more detailed.

Add managed NoSQL benchmarks

Today we have lots of coverage for VMs and Cloud Storage. We should extend to managed NoSQL like Google Cloud Platform (GCP) Datastore, AWS SimpleDB/DynamoDB, Azure [Redis] Cache, etc.

illegal escape sequence "\" from sshKeys causes creation of GceVirtualMachine to fail

./pkb.py --project=elite-firefly-786 --benchmarks=iperf --machine_type=f1-micro
ERROR:root:Got exception running _CreateResource: Creation of GceVirtualMachine failed.
Cause: pkb test fails to create a new instance due to illegal escape sequence character:
Ran gcloud compute instances create perfkit-04bdc6d2-1 --disk name=perfkit-04bdc6d2-1 boot=yes mode=rw --machine-type f1-micro --tags=perfkitbenchmarker --maintenance-policy TERMINATE --metadata sshKeys=perfkit:ssh-rsa\ AAA...RVHn\ root@instance-1 owner=root --project elite-firefly-786 --format json --quiet --zone us-central1-a.
Got return code (2). STDOUT: STDERR: usage: gcloud compute instances create NAME [NAME ...] [optional flags]ERROR: (gcloud.compute.instances.create) argument --metadata: illegal escape sequence at index 23: sshKeys=perfkit:ssh-rsa\

We should add a standard comment block to each Benchmark to detail exactly how it publishes data.

Today we have a schema does that is not broadly shared, and reading the code to figure of the metrics published is slow.

We should create a comment block in each benchmark file detailing how it publishes. In particular we should detail:
test - this is the name of the bechmark
owner - who is running the numbers
labels - This data is a '|' separate list of extra meta data to understand the data point. There are some common labels like 'zone' and 'machine_type'. We should detail all of them for the given benchmark.
metric - What is being reported
units - Units of the metric. There is a pretty standard list here we should not expand unless really needed.
value - the number being reported.

Variable BENCHMARK_INFO and name not consistently defined

  1. Some of *_benchmark.py have variable BENCHMARKS_INFO while other files have BENCHMARK_INFO (singular). For example,
    iperf_benchmark.py:BENCHMARKS_INFO = {'name': 'iperf'
    hadoop_benchmark.py:BENCHMARK_INFO = {'name': 'hadoop_benchmark'
  2. Also, the benchmark names themselves are not consistent. Some are appended with _benchmark and some are not.
  3. Is there a gcloud command that lists out all proper benchmark names that can be given to the pkb.py command for "--benchmark flag=" ?

Error running object_storage_service on GCP

I am able to run gust mb gs://bucketname from my macbook but the benchmark fails with the below error.
Any help/hint to solve this would be great.

./pkb.py --project=iron-potion-771 --benchmarks=object_storage_service

2015-02-17 23:18:30,533 vm_util.py:335 INFO Running: /usr/bin/ssh -A -p 22 [email protected] -2 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PreferredAuthentications=publickey -o PasswordAuthentication=no -o ConnectTimeout=5 -o GSSAPIAuthentication=no -o ServerAliveInterval=30 -o ServerAliveCountMax=10 -i /tmp/perfkitbenchmarker/run_076855d6/perfkitbenchmarker_keyfile /home/perfkit/google-cloud-sdk/bin/gsutil mb gs://pkb076855d6
2015-02-17 23:18:32,714 vm_util.py:349 DEBUG Ran /usr/bin/ssh -A -p 22 [email protected] -2 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o IdentitiesOnly=yes -o PreferredAuthentications=publickey -o PasswordAuthentication=no -o ConnectTimeout=5 -o GSSAPIAuthentication=no -o ServerAliveInterval=30 -o ServerAliveCountMax=10 -i /tmp/perfkitbenchmarker/run_076855d6/perfkitbenchmarker_keyfile /home/perfkit/google-cloud-sdk/bin/gsutil mb gs://pkb076855d6. Got return code (1). STDOUT: STDERR: Warning: Permanently added '130.211.177.246' (RSA) to the list of known hosts.
Creating gs://pkb076855d6/...
BadRequestException: 400 Invalid argument.

Create the --benchmarks=<your-name>Set processing

At the last community meeting we talked about adding named sets of benchmarks for companies that are going to be named in the announcement post. Time to add the feature to support named sets.

The feature will be in two parts.

  1. Part one is a simple addition of a dictionary mapping the name to a set of benchmarks.
  2. Part two which wont be implemented until we clean up config files is the ability or override default flags and setting to further customize how things run.

The current "all" should actually become a superset of all named sets, and a new "standard/official/community" set should be created.

Any preference on "standard" or "official" or "community" as the default set that runs?

Add Windows Support

Today PKB handles Centos, Redhat, Ubuntu, Debian, ... but does not handle Windows.

There are some unique challenges here with the biggest being how to bootstrap Windows to allow remote command execution. On GCE we can do this with startup scripts.

For the actual command automation I think it makes the most sense to use powershell vs ssh like we do on LINUX. However that might tie running Windows workloads to running from Windows machines.

Other options include putty, etc.

Suggestions on how to architect this are welcome.

PerfKitExplorer Dashboard for every benchmark

The benchmarker can output the final results in "Text", "Json", etc. One output it can do is to Google BigQuery. This allows for big data mining.

To make this dashboarding on BQ easier we released a tool called PerfKitExplorer.

The work for this issue is to create a PerfKitExplorer dashboard for every benchmark.

Side note - the explorer is extensible so we could just as easily export to MySQL and create a MySQL widget for the Explorer to analyze results. We just have not done that work yet.

Concerns with assumptions and limitations of UnixBench

I have several concerns with the current usage of UnixBench. I know that most people seems to run UnixBench 'as is' with whatever defaults are set, but I believe this will not show a proper comparison between systems (i.e. OS versions, Compiler versions, libC versions, etc).

Here's why:

  • Doesn't scale beyond 16 CPUs; at least not by default
    • This issue has been known for a while and a patch is available, for some reason when UnixBench was written, a hard-coded limit (16) was set for the Systems and Non-Index benchmarks suites. Obviously, nowadays we have much more CPUs than that on single machine.
    • This means that running UnixBench on a instance-type with 32 CPUs will give scores approximately the same as as 16 CPUs instance-type, assuming they use the same processors, of course.
  • GCC compiler options
  • The UnixBench Makefile by default assumes a Solaris OS, even when the flags for Linux are commented out, although it assumes a Pentium ISA.
  • Compiling with different flags it's known to have huge impacts on the performance of a program, you can tweaks things like unrolling loops, to inlining functions, but more concerning, it's been shown recently that even linking order and environment variables can impact performance significantly.
  • This is a little trickier to solve, but perhaps one way to mitigate this is to statically compiled binaries for specific architectures, this way it will always run the same number of instructions, and be linked the same way.
  • GCC versions!
    • Brendan Gregg wrote this great post showing how wildly UnixBench can vary by just changing GCC versions. I'm just going to link his blog post here, which explains it better and was the inspiration for this issue.

What is your take on these issues?

GCP: Only 4 of 9 VMs spawn on Hadoop Terrasort benchmark

I'm using an f1-micro instance on GCP as my orchestrator for running pkb.

When I execute the Hadoop Terrasort benchmark against an n1-standard-4 machine type, I see 9 disks successfully created, but then only 4 vm's successfully start. The other 5 continue retrying until timeout, and pkb tears down the resources and never executes the benchmark. It's a different 4 each time... on one run, -1,-3,-4,-7, and -8 were missing... but in another run -1,-2,-5,-6, and -7 were missing. That said, it always seems to be the same number of instances that end up missing.

I've only tried this against GCP in us-central1-a.

I see "Got exception running _CreateResource: Creation of DebianBasedGceVirtualMachine failed" for the instances that don't start.

Any ideas why this is happening?

Azure:Cloud Service stood up for every VM?

I'm running PerfkitBenchmarker against Microsoft Azure, and I'm noticing the system creates a cloud service for every VM it stands up. This is not a realistic use of the cloud service. In Azure, Cloud Service is similar to a GCE "Project." In fact, I would suggest that the behavior against Azure be modified such that if the user specifies a --project parameter at runtime, that you use it just like you would for GCP - to put all the VMs for the benchmarks into a cloud service with that name. Otherwise, I would recommend that a cloud service only be stood up against the run-id, and not for every VM.

Add a "best practices check

Today each vendor has a set of best practices like:

  • Using NOOP for the block scheduler
  • Turning on THP
  • Turning of CONNTRACK
  • etc...

As part of running the benchmarks it would be good to have a feature that verifies if best practices have been applied. Mostly this would be a set of checks and it could be published as metadata.

Azure: Perfkit VNets overwrite ExpressRoute settings

I have a service account that runs ExpressRoute for connectivity to my corporate network. I decided to run PerfKitExplorer to test out various Azure VM Sizes and Regions. My assumption was that since PerfkitBenchmarker was setting up its own affinity groups and VNets, that I'd have complete isolation. Unfortunately, it appears that when the network configuration file is being parsed to add new virtual networks to the service account, PerfkitBenchmarker is dropping the ExpressRoute configuration information off... so when it stands up new virtual networks, it destroys ExpressRoute connectivity (and takes out corporate connectivity to Azure resources as a consequence) :-(

Add Facebook's LinkBench benchmark

Overview taken from the LinkBench repo:

LinkBench is a database benchmark developed to evaluate database performance for workloads similar to those of Facebook's production MySQL deployment. LinkBench is highly configurable and extensible. It can be reconfigured to simulate a variety of workloads and plugins can be written for benchmarking additional database systems.

LinkBench is released under the Apache License, Version 2.0.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.