Skip to content

Commit

Permalink
add back fio
Browse files Browse the repository at this point in the history
Signed-off-by: vsoch <[email protected]>
  • Loading branch information
vsoch committed Sep 21, 2023
1 parent 7151697 commit e9c2b0a
Show file tree
Hide file tree
Showing 29 changed files with 355 additions and 149 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
test: [["app-lammps", "ghcr.io/converged-computing/metric-lammps:latest", 120],
#[["perf-hello-world", "ghcr.io/converged-computing/metric-sysstat:latest", 60],
#["io-host-volume", "ghcr.io/converged-computing/metric-sysstat:latest", 60],
#["io-fio", "ghcr.io/converged-computing/metric-fio:latest", 120],
["io-fio", "ghcr.io/converged-computing/metric-fio:latest", 120],
#["io-ior", "ghcr.io/converged-computing/metric-ior:latest", 120],
## ["network-chatterbug", "ghcr.io/converged-computing/metric-chatterbug:latest", 120],
["app-nekbone", "ghcr.io/converged-computing/metric-nekbone:latest", 120],
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ To learn more:

- Document and automate docs for addons (options, etc.)
- Addons likely needs to be a list to support > 1 of one type! Then subsequent changes so it's not 1:1
- Is there any reason we cannot generate the names for the addon volumes?

- We need a way for the entrypoint command to monitor (based on the container) to differ (potentially)
- For larger metric collections, we should have a log streaming mode (and not wait for Completed/Successful)
Expand Down
3 changes: 2 additions & 1 deletion controllers/metric/metric_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ func (r *MetricSetReconciler) Reconcile(ctx context.Context, req ctrl.Request) (
set := mctrl.MetricSet{}
for _, metric := range spec.Spec.Metrics {

// Get the individual metric, the type will determine the set we add it to
// Get the individual metric
r.Log.Info(fmt.Sprintf("🟦️ Looking for metric %s\n", metric.Name))
m, err := mctrl.GetMetric(&metric, &spec)
if err != nil {
r.Log.Error(err, fmt.Sprintf("🟥️ We had an issue loading that metric %s!", metric.Name))
Expand Down
13 changes: 10 additions & 3 deletions docs/_static/data/metrics.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[
{
"name": "app-amg",
"description": "parallel algebraic multigrid solver for linear systems arising from problems on unstructured grids",
"name": "",
"description": "",
"family": "solver",
"image": "ghcr.io/converged-computing/metric-amg:latest",
"image": "",
"url": "https://github.com/LLNL/AMG"
},
{
Expand Down Expand Up @@ -68,5 +68,12 @@
"family": "simulation",
"image": "ghcr.io/converged-computing/metric-quicksilver:latest",
"url": "https://github.com/LLNL/Quicksilver"
},
{
"name": "io-fio",
"description": "Flexible IO Tester (FIO)",
"family": "storage",
"image": "ghcr.io/converged-computing/metric-fio:latest",
"url": "https://fio.readthedocs.io/en/latest/fio_doc.html"
}
]
9 changes: 6 additions & 3 deletions docs/getting_started/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,13 +128,16 @@ Options you can set include:
|Name | Description | Type | Default |
|-----|-------------|------------|------|
|testname | Name for the test | string | test |
| testname | Name for the test | string | test |
| blocksize | Size of block to write. It defaults to 4k, but can be set from 256 to 8k. | string | 4k |
| iodepth | Number of I/O units to keep in flight against the file. | int | 64 |
| size | Total size of file to write | string | 4G |
| directory | Directory (usually mounted) to test. | string | /tmp |
| pre | Custom logic / command to run before Fio | string | unset |
| post | Custom logic / command to run after Fio (e.g., cleanup) | string | unset |
| prefix | Prefix to add to running fio commands (like a wrapper) | string | unset |
For the last "directory" we use this location to write a temporary file, which will be cleaned up.
For the "directory" we use this location to write a temporary file, which will be cleaned up.
This allows for testing storage mounted from multiple metric pods without worrying about a name conflict.
#### io-ior
Expand Down Expand Up @@ -205,7 +208,7 @@ Variables to customize include:
|Name | Description | Option Key | Type | Default |
|-----|-------------|------------|------|---------|
| commands | Custom list of osu-benchmark one-sided commands to run | listOptions->commands | array | unset uses default set |
| sole-tenancy | Turn off sole tenancy (one pod/node) | string ("false" or "no") | "true" |
| soleTenancy | Turn off sole tenancy (one pod/node) | string ("false" or "no") | "true" |
| all | Run ALL benchmarks with defaults | string ("true" or "yes") | "false" |
| flags | Overwrite defaults flags (experts only!)| string | Defaults to an ideal set per metric (see [osu-benchmark.go](https://github.com/converged-computing/metrics-operator/blob/main/pkg/metrics/network/osu-benchmark.go))|
| timed | String "true" or "yes" to add time prefix to mpirun (for debugging, etc) | string | "false" |
Expand Down
16 changes: 7 additions & 9 deletions examples/tests/io-fio/metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,17 @@ metadata:
app.kubernetes.io/instance: metricset-sample
name: metricset-sample
spec:
storage:
volume:
# This is the path on the host (e.g., inside kind container)
hostPath: /tmp/workflow

# This is the path in the container
path: /tmp/workflow

metrics:
# Fio just runs once - no concept of completions / rate
- name: io-fio
options:
size: 1M
blocksize: 1K
directory: /tmp/workflow

# Fio usually will have a volume as an addon, let's do hostpath here
addons:
- name: volume-hostpath
options:
name: fio-mount
hostPath: /tmp/workflow
path: /tmp/workflow
2 changes: 1 addition & 1 deletion examples/tests/io-fio/post-run.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

echo "Cleaning up /tmp/workflow in minikube"
minikube ssh -- sudo rm -rf /tmp/workflow
minikube ssh -- sudo rm -rf /tmp/workflow
2 changes: 1 addition & 1 deletion hack/docs-gen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
// Metrics are registered here! Importing registers once
"github.com/converged-computing/metrics-operator/pkg/metrics"
_ "github.com/converged-computing/metrics-operator/pkg/metrics/app"
// _ "github.com/converged-computing/metrics-operator/pkg/metrics/io"
_ "github.com/converged-computing/metrics-operator/pkg/metrics/io"
// _ "github.com/converged-computing/metrics-operator/pkg/metrics/network"
// _ "github.com/converged-computing/metrics-operator/pkg/metrics/perf"
//
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import (

// Metrics are registered here! Importing registers once
_ "github.com/converged-computing/metrics-operator/pkg/metrics/app"
// _ "github.com/converged-computing/metrics-operator/pkg/metrics/io"
_ "github.com/converged-computing/metrics-operator/pkg/metrics/io"
// _ "github.com/converged-computing/metrics-operator/pkg/metrics/network"
// _ "github.com/converged-computing/metrics-operator/pkg/metrics/perf"
//
Expand Down
13 changes: 5 additions & 8 deletions pkg/addons/addons.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"fmt"
"log"

corev1 "k8s.io/api/core/v1"
jobset "sigs.k8s.io/jobset/api/jobset/v1alpha2"

api "github.com/converged-computing/metrics-operator/api/v1alpha1"
Expand Down Expand Up @@ -39,8 +38,7 @@ type Addon interface {
MapOptions() map[string]map[string]intstr.IntOrString

// What addons can control:
GetVolumes() []corev1.Volume
AssembleVolumes() []specs.VolumeSpec
AssembleVolumes() specs.VolumeSpec
AssembleContainers() []specs.ContainerSpec
CustomizeEntrypoints([]*specs.ContainerSpec, []*jobset.ReplicatedJob)

Expand All @@ -67,14 +65,13 @@ func (b AddonBase) CustomizeEntrypoints([]*specs.ContainerSpec, []*jobset.Replic
func (b AddonBase) Validate() bool {
return true
}
func (b AddonBase) GetVolumes() []corev1.Volume {
return []corev1.Volume{}
}
func (b AddonBase) AssembleContainers() []specs.ContainerSpec {
return []specs.ContainerSpec{}
}
func (b AddonBase) AssembleVolumes() []specs.VolumeSpec {
return []specs.VolumeSpec{}

// Assemble Volumes (for now) just generates one
func (b AddonBase) AssembleVolumes() specs.VolumeSpec {
return specs.VolumeSpec{}
}

func (b AddonBase) Description() string {
Expand Down
6 changes: 0 additions & 6 deletions pkg/addons/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
"fmt"

api "github.com/converged-computing/metrics-operator/api/v1alpha1"
"github.com/converged-computing/metrics-operator/pkg/specs"
"k8s.io/apimachinery/pkg/util/intstr"
)

Expand Down Expand Up @@ -151,11 +150,6 @@ func (a *ApplicationAddon) MapOptions() map[string]map[string]intstr.IntOrString
}
}

// AssembleVolumes for an application
func (a *ApplicationAddon) AssembleVolumes() []specs.VolumeSpec {
return []specs.VolumeSpec{}
}

func init() {

// Config map volume type
Expand Down
6 changes: 3 additions & 3 deletions pkg/addons/hpctoolkit.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,18 @@ type HPCToolkit struct {
}

// AssembleVolumes to provide an empty volume for the application to share
func (m HPCToolkit) AssembleVolumes() []specs.VolumeSpec {
func (m HPCToolkit) AssembleVolumes() specs.VolumeSpec {
volume := corev1.Volume{
Name: "hpctoolkit",
VolumeSource: corev1.VolumeSource{
EmptyDir: &corev1.EmptyDirVolumeSource{},
},
}
// EmptyDir should be ReadOnly False, and we don't need a mount for it
return []specs.VolumeSpec{{
return specs.VolumeSpec{
Volume: volume,
Mount: false,
}}
}
}

// Validate we have an executable provided, and args and optional
Expand Down
Loading

0 comments on commit e9c2b0a

Please sign in to comment.