fio

package
v0.4.47 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

View Source
const (
	// DefaultNS describes the default namespace
	DefaultNS = "default"
	// PodNamespaceEnvKey describes the pod namespace env variable
	PodNamespaceEnvKey = "POD_NAMESPACE"
	// DefaultFIOJob describes the default FIO job
	DefaultFIOJob = "default-fio"
	// KubestrFIOJobGenName describes the generate name
	KubestrFIOJobGenName = "kubestr-fio"
	// ConfigMapJobKey is the default fio job key
	ConfigMapJobKey = "fiojob"
	// DefaultPVCSize is the default PVC size
	DefaultPVCSize = "100Gi"
	// PVCGenerateName is the name to generate for the PVC
	PVCGenerateName = "kubestr-fio-pvc-"
	// PodGenerateName is the name to generate for the POD
	PodGenerateName = "kubestr-fio-pod-"
	// ContainerName is the name of the container that runs the job
	ContainerName = "kubestr-fio"
	// PodNameEnvKey is the name of the variable used to get the current pod name
	PodNameEnvKey = "HOSTNAME"
	// ConfigMapMountPath is the path where we mount the configmap
	ConfigMapMountPath = "/etc/fio-config"
	// VolumeMountPath is the path where we mount the volume
	VolumeMountPath = "/dataset"
	// CreatedByFIOLabel is the key that desrcibes the label used to mark configmaps
	CreatedByFIOLabel = "createdbyfio"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FIO

type FIO interface {
	RunFio(ctx context.Context, args *RunFIOArgs) (*RunFIOResult, error) // , test config
}

FIO is an interface that represents FIO related commands

type FIOrunner

type FIOrunner struct {
	Cli kubernetes.Interface
	// contains filtered or unexported fields
}

FIOrunner implments FIO

func (*FIOrunner) RunFio

func (f *FIOrunner) RunFio(ctx context.Context, args *RunFIOArgs) (*RunFIOResult, error)

func (*FIOrunner) RunFioHelper

func (f *FIOrunner) RunFioHelper(ctx context.Context, args *RunFIOArgs) (*RunFIOResult, error)

type FioDepth added in v0.4.10

type FioDepth struct {
	FioDepth0    float32 `json:"0,omitempty"`
	FioDepth1    float32 `json:"1,omitempty"`
	FioDepth2    float32 `json:"2,omitempty"`
	FioDepth4    float32 `json:"4,omitempty"`
	FioDepth8    float32 `json:"8,omitempty"`
	FioDepth16   float32 `json:"16,omitempty"`
	FioDepth32   float32 `json:"32,omitempty"`
	FioDepth64   float32 `json:"64,omitempty"`
	FioDepthGE64 float32 `json:">=64,omitempty"`
}

type FioDiskUtil added in v0.4.10

type FioDiskUtil struct {
	Name        string  `json:"name,omitempty"`
	ReadIos     int64   `json:"read_ios,omitempty"`
	WriteIos    int64   `json:"write_ios,omitempty"`
	ReadMerges  int64   `json:"read_merges,omitempty"`
	WriteMerges int64   `json:"write_merges,omitempty"`
	ReadTicks   int64   `json:"read_ticks,omitempty"`
	WriteTicks  int64   `json:"write_ticks,omitempty"`
	InQueue     int64   `json:"in_queue,omitempty"`
	Util        float32 `json:"util,omitempty"`
}

func (FioDiskUtil) Print added in v0.4.10

func (d FioDiskUtil) Print() string

type FioGlobalOptions added in v0.4.10

type FioGlobalOptions struct {
	Directory  string `json:"directory,omitempty"`
	RandRepeat string `json:"randrepeat,omitempty"`
	Verify     string `json:"verify,omitempty"`
	IOEngine   string `json:"ioengine,omitempty"`
	Direct     string `json:"direct,omitempty"`
	GtodReduce string `json:"gtod_reduce,omitempty"`
}

func (FioGlobalOptions) Print added in v0.4.10

func (g FioGlobalOptions) Print() string

type FioJobOptions added in v0.4.10

type FioJobOptions struct {
	Name     string `json:"name,omitempty"`
	BS       string `json:"bs,omitempty"`
	IoDepth  string `json:"iodepth,omitempty"`
	Size     string `json:"size,omitempty"`
	RW       string `json:"rw,omitempty"`
	RampTime string `json:"ramp_time,omitempty"`
	RunTime  string `json:"runtime,omitempty"`
}

func (FioJobOptions) Print added in v0.4.10

func (o FioJobOptions) Print() string

type FioJobs added in v0.4.10

type FioJobs struct {
	JobName           string        `json:"jobname,omitempty"`
	GroupID           int           `json:"groupid,omitempty"`
	Error             int           `json:"error,omitempty"`
	Eta               int           `json:"eta,omitempty"`
	Elapsed           int           `json:"elapsed,omitempty"`
	JobOptions        FioJobOptions `json:"job options,omitempty"`
	Read              FioStats      `json:"read,omitempty"`
	Write             FioStats      `json:"write,omitempty"`
	Trim              FioStats      `json:"trim,omitempty"`
	Sync              FioStats      `json:"sync,omitempty"`
	JobRuntime        int32         `json:"job_runtime,omitempty"`
	UsrCpu            float32       `json:"usr_cpu,omitempty"`
	SysCpu            float32       `json:"sys_cpu,omitempty"`
	Ctx               int32         `json:"ctx,omitempty"`
	MajF              int32         `json:"majf,omitempty"`
	MinF              int32         `json:"minf,omitempty"`
	IoDepthLevel      FioDepth      `json:"iodepth_level,omitempty"`
	IoDepthSubmit     FioDepth      `json:"iodepth_submit,omitempty"`
	IoDepthComplete   FioDepth      `json:"iodepth_complete,omitempty"`
	LatencyNs         FioLatency    `json:"latency_ns,omitempty"`
	LatencyUs         FioLatency    `json:"latency_us,omitempty"`
	LatencyMs         FioLatency    `json:"latency_ms,omitempty"`
	LatencyDepth      int32         `json:"latency_depth,omitempty"`
	LatencyTarget     int32         `json:"latency_target,omitempty"`
	LatencyPercentile float32       `json:"latency_percentile,omitempty"`
	LatencyWindow     int32         `json:"latency_window,omitempty"`
}

func (FioJobs) Print added in v0.4.10

func (j FioJobs) Print() string

type FioLatency added in v0.4.10

type FioLatency struct {
	FioLat2      float32 `json:"2,omitempty"`
	FioLat4      float32 `json:"4,omitempty"`
	FioLat10     float32 `json:"10,omitempty"`
	FioLat20     float32 `json:"20,omitempty"`
	FioLat50     float32 `json:"50,omitempty"`
	FioLat100    float32 `json:"100,omitempty"`
	FioLat250    float32 `json:"250,omitempty"`
	FioLat500    float32 `json:"500,omitempty"`
	FioLat750    float32 `json:"750,omitempty"`
	FioLat1000   float32 `json:"1000,omitempty"`
	FioLat2000   float32 `json:"2000,omitempty"`
	FioLatGE2000 float32 `json:">=2000,omitempty"`
}

type FioNS added in v0.4.10

type FioNS struct {
	Min    int64   `json:"min,omitempty"`
	Max    int64   `json:"max,omitempty"`
	Mean   float32 `json:"mean,omitempty"`
	StdDev float32 `json:"stddev,omitempty"`
	N      int64   `json:"N,omitempty"`
}

type FioResult added in v0.4.10

type FioResult struct {
	FioVersion    string           `json:"fio version,omitempty"`
	Timestamp     int64            `json:"timestamp,omitempty"`
	TimestampMS   int64            `json:"timestamp_ms,omitempty"`
	Time          string           `json:"time,omitempty"`
	GlobalOptions FioGlobalOptions `json:"global options,omitempty"`
	Jobs          []FioJobs        `json:"jobs,omitempty"`
	DiskUtil      []FioDiskUtil    `json:"disk_util,omitempty"`
}

func (FioResult) Print added in v0.4.10

func (f FioResult) Print() string

type FioStats added in v0.4.10

type FioStats struct {
	IOBytes     int64   `json:"io_bytes,omitempty"`
	IOKBytes    int64   `json:"io_kbytes,omitempty"`
	BWBytes     int64   `json:"bw_bytes,omitempty"`
	BW          int64   `json:"bw,omitempty"`
	Iops        float32 `json:"iops,omitempty"`
	Runtime     int64   `json:"runtime,omitempty"`
	TotalIos    int64   `json:"total_ios,omitempty"`
	ShortIos    int64   `json:"short_ios,omitempty"`
	DropIos     int64   `json:"drop_ios,omitempty"`
	SlatNs      FioNS   `json:"slat_ns,omitempty"`
	ClatNs      FioNS   `json:"clat_ns,omitempty"`
	LatNs       FioNS   `json:"lat_ns,omitempty"`
	BwMin       int64   `json:"bw_min,omitempty"`
	BwMax       int64   `json:"bw_max,omitempty"`
	BwAgg       float32 `json:"bw_agg,omitempty"`
	BwMean      float32 `json:"bw_mean,omitempty"`
	BwDev       float32 `json:"bw_dev,omitempty"`
	BwSamples   int32   `json:"bw_samples,omitempty"`
	IopsMin     int32   `json:"iops_min,omitempty"`
	IopsMax     int32   `json:"iops_max,omitempty"`
	IopsMean    float32 `json:"iops_mean,omitempty"`
	IopsStdDev  float32 `json:"iops_stddev,omitempty"`
	IopsSamples int32   `json:"iops_samples,omitempty"`
}

func (FioStats) Print added in v0.4.10

func (s FioStats) Print() string

type RunFIOArgs

type RunFIOArgs struct {
	StorageClass   string
	Size           string
	Namespace      string
	NodeSelector   map[string]string
	FIOJobFilepath string
	FIOJobName     string
	Image          string
}

func (*RunFIOArgs) Validate added in v0.4.0

func (a *RunFIOArgs) Validate() error

type RunFIOResult added in v0.4.0

type RunFIOResult struct {
	Size         string            `json:"size,omitempty"`
	StorageClass *sv1.StorageClass `json:"storageClass,omitempty"`
	FioConfig    string            `json:"fioConfig,omitempty"`
	Result       FioResult         `json:"result,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL