param

package
v0.0.0-...-5732428 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2017 License: GPL-3.0 Imports: 8 Imported by: 1

Documentation

Overview

Parameters are tunable switches on the system that are tuned in very specific ways.

Each tunable parameter is able to inspect the system to determine the current value, calculate a new value according to system environment and/or user input, and be able to apply the new value upon request.

There's only one way to tune a parameter, however a parameter can be referred to by one or more SAP notes.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValidScheduler

func IsValidScheduler(blockdev, scheduler string) bool

func IsValidforNrRequests

func IsValidforNrRequests(blockdev, nrreq string) bool

func MaxI

func MaxI(values ...int) int

Return the maximum among the input values. If there isn't any input value, return 0.

func MaxI64

func MaxI64(values ...int64) int64

Return the maximum among the input values. If there isn't any input value, return 0.

func MaxU64

func MaxU64(values ...uint64) uint64

Return the maximum among the input values. If there isn't any input value, return 0.

func MinU64

func MinU64(values ...uint64) uint64

Return the minimum among the input values. If there isn't any input value, return 0.

Types

type BlockDeviceNrRequests

type BlockDeviceNrRequests struct {
	NrRequests map[string]int
}

Change IO nr_requests on all block devices

func (BlockDeviceNrRequests) Apply

func (ior BlockDeviceNrRequests) Apply() error

func (BlockDeviceNrRequests) Inspect

func (ior BlockDeviceNrRequests) Inspect() (Parameter, error)

func (BlockDeviceNrRequests) Optimise

func (ior BlockDeviceNrRequests) Optimise(newNrRequestValue interface{}) (Parameter, error)

type BlockDeviceSchedulers

type BlockDeviceSchedulers struct {
	SchedulerChoice map[string]string
}

Change IO elevators on all IO devices

func (BlockDeviceSchedulers) Apply

func (ioe BlockDeviceSchedulers) Apply() error

func (BlockDeviceSchedulers) Inspect

func (ioe BlockDeviceSchedulers) Inspect() (Parameter, error)

func (BlockDeviceSchedulers) Optimise

func (ioe BlockDeviceSchedulers) Optimise(newElevatorName interface{}) (Parameter, error)

type Parameter

type Parameter interface {
	Inspect() (Parameter, error)                             // Read the parameter values from current system.
	Optimise(additionalInput interface{}) (Parameter, error) // Calculate new values based on internal states, and return a copy of new states.
	Apply() error                                            // Apply the parameter value without further calculation.
}

A tunable parameter, usually calculated based on user input and/or automatically. Parameter is immutable. Internal state changes can only be made to copies.

Jump to

Keyboard shortcuts

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