ksmtuned

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Ksmd = "ksmd"

	KSMPath            ksmPath = "/sys/kernel/mm/ksm"
	RunPath                    = KSMPath + "/run"
	PagesToScanPath            = KSMPath + "/pages_to_scan"
	SleepMillisecsPath         = KSMPath + "/sleep_millisecs"
	MergeAcrossNodes           = KSMPath + "/merge_across_nodes"
)
View Source
const (
	MonitorInterval = time.Second * 60
	MinThres        = 5
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Ksmtuned

type Ksmtuned struct {
	// contains filtered or unexported fields
}

func NewKsmtuned

func NewKsmtuned(ctx context.Context, nodeName string) (*Ksmtuned, error)

func (*Ksmtuned) Apply

func (k *Ksmtuned) Apply(thresCoef uint, param ksmtunedv1.KsmtunedParameters)

func (*Ksmtuned) Prune

func (k *Ksmtuned) Prune() error

func (*Ksmtuned) RunStatus

func (k *Ksmtuned) RunStatus() (ksmtunedv1.KsmdPhase, error)

func (*Ksmtuned) SetKsmdUtilization

func (k *Ksmtuned) SetKsmdUtilization(gv *prometheus.GaugeVec)

func (*Ksmtuned) Status

func (k *Ksmtuned) Status() <-chan *ksmtunedv1.KsmtunedStatus

func (*Ksmtuned) Stop

func (k *Ksmtuned) Stop() error

func (Ksmtuned) ToggleMergeAcrossNodes

func (k Ksmtuned) ToggleMergeAcrossNodes(toggle uint) error

ToggleMergeAcrossNodes toggle /sys/kernel/mm/ksm/merge_across_nodes

Jump to

Keyboard shortcuts

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