Skip to content

Commit

Permalink
Initial update. Still a work in progress
Browse files Browse the repository at this point in the history
Still working on this, wanted to get the basics up
  • Loading branch information
bplein committed Oct 13, 2023
1 parent 075d825 commit 7e23a67
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 51 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ cd image
docker build -t px-bench .
docker push ...
```
* Edit `px-bench.yml` to set the ConfigMap `env` to set desired values. If necessary, update `image:` to reflect the image you built.
* Create a namespace for your benchmarking, and set your context to it (or ensure that you are applying all YAML below to that namespace)
* TBD: Create a wrapper script that will create the namespace and apply all YAML in order and with correct timing!
* Copy an example `px-bench-env.yml` from the examples directory. There are various examples for different clound enviroments.
* Edit `px-bench-env.yml` to set the ConfigMap `env` to set desired values. If necessary, update `image:` to reflect the image you built.
* `kubectl apply -f px-bench.yml` to start apply the configuration settings.
* Do NOT edit `px-bench-main.yml` (unless you are attempting to change the behavior of the benchmark!)
* In order to consume most of the available RAM so it is not used for buffering, run `kubectl apply -f chewram.yml`.
* Wait for `kubectl get pod -n chewram` for all the pods to show as `1/1 Running`.
* `kubectl apply -f px-bench.yml` to start the run.
Expand Down
6 changes: 6 additions & 0 deletions TheoryOfOps.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Theory of Operations

## This document gives guidance on how to use px-bench and
## the reasoning behind its architecture and default settings.

PLACEHOLDER
61 changes: 61 additions & 0 deletions examples/aws/px-bench-env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
######
# AWS Example. Valid for EKS or other K8s orchestrators hosted in AWS.
#
# See https://docs.aws.amazon.com/eks/latest/userguide/storage.html for links to various drivers available in EKS.
#
# EBS: Since Portworx would consume EBS volumes as Portworx Clouddrives, attempting "apples to apples" comparisons
# between AWS native storage and Portworx should be done with EBS volumes that are the same size as the
# Portworx clouddrive used for the pool.
# Installation of the EBS CSI is documented here: https://docs.aws.amazon.com/eks/latest/userguide/ebs-csi.html
#
# The configmap below (see the Iteration Control section near the bottom) references an EBS storageclass
# called "ebs-sc", update it to your desired AWS storageclass. This example will benchmark "ebs-sc" vs.
# the Portworx storageclass "px-csi-db"
#
---
apiVersion: v1
kind: ConfigMap
metadata:
name: env
######
# Options that control the underlying fio benchmark utility. These equate to the same-named option in fio
#
data:
file_size: "10GiB" # size of region of IO testing, will also be the size of the file
pvc_size: "150Gi" # If the storageclass is backed by a larger disk from infrastructure,
# such as a Portworx pool, then pvc_size should be the same size as
# the backing storage if it's desired to be testing the same
# size and performance storage (See TheoryOfOps.md)
runtime: "20" # runtime in seconds. Start low the first time to ensure everything
# is working as planned. Then increase to desired runtime.
iodepth: "128"
rwmixread: "60" # only used for readwrite and randrw workloads
rwmixwrite: "40" # should be 100 - rwmixread
ramp_time: "5" # ramp time per test. As with runtime, keep low for quick tests
# and then increase to desired ramp_time for later tests

# Less commonly changed fio options
ioengine: "libaio"
direct: "1"
fsync_on_close: "1"
numjobs: "1"
group_reporting: "1"

######
# px-bench specific options. These are not fio options
mixed_workloads: "rw readwrite randrw" # rw is a synonym for readwrite

######
# Iteration Control: Each variable will be looped over to create the jobs to be run.
# Do not change the variable name. The variable must consist of one or more space
# delimited strings that are legal values for fio to use in a job file.
#
# For now, the only supported variables here are blocksize and randwrite
#
# Example: If you have 2 blocksize values, and 3 randwrite values, this will result in 6 jobfiles.

blocksize_list: "4k 16k 256k" # We have not tested fio's support for different values for read and write ("bs=8k,32k")
readwrite_list: "read write readwrite" # valid values are read, write, randread, readwrite (or rw), randrw.
storageclass_list: "ebs-sc px-csi-db" # Existing storageclasses for use by the benchmarks
warmup_blocksize: 256k
warmup_loops: "1"
48 changes: 48 additions & 0 deletions examples/generic/px-bench-env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
apiVersion: v1
kind: ConfigMap
metadata:
name: env

######
# Options that control the underlying fio benchmark utility. These equate to the same-named option in fio
#
data:
file_size: "10GiB" # size of region of IO testing, will also be the size of the file
pvc_size: "50Gi" # If the storageclass is backed by a larger disk from infrastructure,
# such as a Portworx pool, then pvc_size should be the same size as
# the backing storage if it's desired to be testing the same
# size and performance storage (See TheoryOfOps.md)
runtime: "20" # runtime in seconds. Start low the first time to ensure everything
# is working as planned. Then increase to desired runtime.
iodepth: "128"
rwmixread: "60" # only used for readwrite and randrw workloads
rwmixwrite: "40" # should be 100 - rwmixread
ramp_time: "5" # ramp time per test. As with runtime, keep low for quick tests
# and then increase to desired ramp_time for later tests

# Less commonly changed fio options
ioengine: "libaio"
direct: "1"
fsync_on_close: "1"
numjobs: "1"
group_reporting: "1"

######
# px-bench specific options. These are not fio options
mixed_workloads: "rw readwrite randrw" # rw is a synonym for readwrite

######
# Iteration Control: Each variable will be looped over to create the jobs to be run.
# Do not change the variable name. The variable must consist of one or more space
# delimited strings that are legal values for fio to use in a job file.
#
# For now, the only supported variables here are blocksize and randwrite
#
# Example: If you have 2 blocksize values, and 3 randwrite values, this will result in 6 jobfiles.

blocksize_list: "4k 16k 256k" # We have not tested fio's support for different values for read and write ("bs=8k,32k")
readwrite_list: "read write readwrite" # valid values are read, write, randread, readwrite (or rw), randrw.
storageclass_list: "storageclass-1 storageclass-2" # Existing storageclasses for use by the benchmarks
warmup_blocksize: 256k
warmup_loops: "1"
50 changes: 0 additions & 50 deletions px-bench.yml → px-bench-main.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,8 @@
apiVersion: v1
kind: Namespace
metadata:
name: px-bench
---
apiVersion: v1
kind: ConfigMap
metadata:
name: env
namespace: px-bench
data:
file_size: "10GiB" # size of region of IO testing, will also be the size of the file
pvc_size: "50Gi"
runtime: "20" # runtime in seconds
iodepth: "128"
rwmixread: "60" # only used for readwrite and randrw workloads
rwmixwrite: "40"
ramp_time: "5" # ramp time per test

# Less commonly changed options
ioengine: "libaio"
direct: "1"
fsync_on_close: "1"
numjobs: "1"
group_reporting: "1"

######
# px-bench specific options. These are not fio options
mixed_workloads: "rw readwrite randrw" # rw is a synonym for readwrite

######
# Iteration Control: Each variable will be looped over to create the jobs to be run.
# Do not change the variable name. The variable must consist of one or more space
# delimited strings that are legal values for fio to use in a job file.
#
# For now, the only supported variables here are blocksize and randwrite
#
# Example: If you have 2 blocksize values, and 3 randwrite values, this will result in 6 jobfiles.

blocksize_list: "4k 16k 256k" # We have not tested fio's support for different values for read and write ("bs=8k,32k")
readwrite_list: "read write readwrite" # valid values are read, write, randread, readwrite (or rw), randrw.
storageclass_list: "px-db px-replicated" # Existing storageclasses for use by the benchmarks
warmup_blocksize: 256k
warmup_loops: "1"
---
apiVersion: v1
kind: ConfigMap
metadata:
name: files
namespace: px-bench
data:
run.sh: |-
#!/usr/bin/bash
Expand Down Expand Up @@ -110,7 +65,6 @@ data:
kind: Job
metadata:
name: fio
namespace: px-bench
spec:
template:
metadata:
Expand Down Expand Up @@ -202,13 +156,11 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: px-bench
namespace: px-bench
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: px-bench
namespace: px-bench
rules:
- apiGroups: [""]
resources:
Expand All @@ -229,7 +181,6 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: px-bench
namespace: px-bench
subjects:
- kind: ServiceAccount
name: px-bench
Expand All @@ -242,7 +193,6 @@ apiVersion: batch/v1
kind: Job
metadata:
name: run
namespace: px-bench
spec:
template:
metadata:
Expand Down

0 comments on commit 7e23a67

Please sign in to comment.