note

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: 14 Imported by: 2

Documentation

Overview

SAP notes tune one or more parameters at a time.

Each note is capable of inspecting the system to determine current parameter values, assist each parameter in calculating an optimised value, and apply all parameters.

A system can be tuned for more than one note at a time.

Index

Constants

View Source
const (
	// LoginConfDir is the path to systemd's logind configuration directory under /etc.
	LogindConfDir = "/etc/systemd/logind.conf.d"
	// LogindSAPConfFile is a configuration file full of SAP-specific settings for logind.
	LogindSAPConfFile = "sap.conf"
	// LogindSAAPConfContent is the verbatim content of SAP-specific logind settings file.
	LogindSAPConfContent = `
[Login]
UserTasksMax=infinity
`
)
View Source
const (
	INISectionSysctl    = "sysctl"
	INISectionVM        = "vm"
	INISectionBlock     = "block"
	INISectionLimits    = "limits"
	SysKernelTHPEnabled = "kernel/mm/transparent_hugepage/enabled"
	SysKSMRun           = "kernel/mm/ksm/run"
)

Variables

This section is empty.

Functions

func CalculateOptimumValue

func CalculateOptimumValue(operator txtparser.Operator, currentValue string, expectedValue string) (string, error)

Calculate optimum parameter value given the current value, comparison operator, and expected value. Return optimised value.

func CompareJSValue

func CompareJSValue(v1, v2 interface{}) (v1JS, v2JS string, match bool)

Compare JSON representation of two values and see if they match.

func CompareNoteFields

func CompareNoteFields(actualNote, expectedNote Note) (allMatch bool, comparisons map[string]NoteFieldComparison)

Compare the content of two notes and return differences in their fields in a human-readable text.

func GetBlockVal

func GetBlockVal(key string) (string, error)

func GetLimitsVal

func GetLimitsVal(key string) (string, error)

section [limits]

func GetVmVal

func GetVmVal(parameter string) string

section [vm] Manipulate /sys/kernel/mm switches.

func OptBlkVal

func OptBlkVal(parameter, act_value, cfg_value string) string

func OptLimitsVal

func OptLimitsVal(act_value, cfg_value string) string

func OptVmVal

func OptVmVal(parameter, act_value, cfg_value string) string

func SetBlkVal

func SetBlkVal(key, value string) error

func SetLimitsVal

func SetLimitsVal(key, value string) error

Types

type AfterInstallation

type AfterInstallation struct {
	UuiddSocketStatus bool // UuiddSocketStatus is the status of systemd unit called "uuidd.socket"
	LogindConfigured  bool // LogindConfigured is true if SAP's logind customisation file is in-place
}

1984787 - SUSE LINUX Enterprise Server 12: Installation notes

func (AfterInstallation) Apply

func (inst AfterInstallation) Apply() error

func (AfterInstallation) Initialise

func (inst AfterInstallation) Initialise() (Note, error)

func (AfterInstallation) Name

func (inst AfterInstallation) Name() string

func (AfterInstallation) Optimise

func (inst AfterInstallation) Optimise() (Note, error)

type BlockDeviceQueue

type BlockDeviceQueue struct {
	BlockDeviceSchedulers param.BlockDeviceSchedulers
	BlockDeviceNrRequests param.BlockDeviceNrRequests
}

section [block]

type HANARecommendedOSSettings

type HANARecommendedOSSettings struct {
	KernelMMTransparentHugepage string
	KernelMMKsm                 bool
	KernelNumaBalancing         bool
}

2205917 - SAP HANA DB: Recommended OS settings for SLES 12 / SLES for SAP Applications 12 Disable kernel memory management features that will introduce additional overhead.

func (HANARecommendedOSSettings) Apply

func (hana HANARecommendedOSSettings) Apply() error

func (HANARecommendedOSSettings) Initialise

func (hana HANARecommendedOSSettings) Initialise() (Note, error)

func (HANARecommendedOSSettings) Name

func (hana HANARecommendedOSSettings) Name() string

func (HANARecommendedOSSettings) Optimise

func (hana HANARecommendedOSSettings) Optimise() (Note, error)

type INISettings

type INISettings struct {
	ConfFilePath    string            // Full path to the 3rd party vendor's tuning configuration file
	ID              string            // ID portion of the tuning configuration
	DescriptiveName string            // Descriptive name portion of the tuning configuration
	SysctlParams    map[string]string // Sysctl parameter values from the computer system
}

Tuning options composed by a third party vendor.

func (INISettings) Apply

func (vend INISettings) Apply() error

func (INISettings) Initialise

func (vend INISettings) Initialise() (Note, error)

func (INISettings) Name

func (vend INISettings) Name() string

func (INISettings) Optimise

func (vend INISettings) Optimise() (Note, error)

type LinuxPagingImprovements

type LinuxPagingImprovements struct {
	SysconfigPrefix string // Used by test cases to specify alternative sysconfig location

	VMPagecacheLimitMB          uint64
	VMPagecacheLimitIgnoreDirty int
	UseAlgorithmForHANA         bool
}

1557506 - Linux paging improvements

func (LinuxPagingImprovements) Apply

func (paging LinuxPagingImprovements) Apply() error

func (LinuxPagingImprovements) Initialise

func (paging LinuxPagingImprovements) Initialise() (Note, error)

func (LinuxPagingImprovements) Name

func (paging LinuxPagingImprovements) Name() string

func (LinuxPagingImprovements) Optimise

func (paging LinuxPagingImprovements) Optimise() (Note, error)

type Note

type Note interface {
	Initialise() (Note, error) // Inspect all tuning parameters and return.
	Optimise() (Note, error)   // (Re)calculate all parameters, but do not apply.
	Apply() error              // Apply all tuning parameters without further calculation.
	Name() string              // The original note name.
}

An SAP note consisting of a series of tunable parameters that can be applied and reverted. Parameter is immutable. Internal state changes can only be made to copies.

type NoteFieldComparison

type NoteFieldComparison struct {
	ReflectFieldName               string // Structure field name
	ReflectMapKey                  string // If structure field is a map, this is the map key
	ActualValue, ExpectedValue     interface{}
	ActualValueJS, ExpectedValueJS string
	MatchExpectation               bool
}

Record the actual value versus expected value for a note field. The field name has to be the actual name in Go struct.

type PrepareForSAPEnvironments

type PrepareForSAPEnvironments struct {
	SysconfigPrefix                                         string
	ShmFileSystemSizeMB                                     int64
	LimitNofileSapsysSoft, LimitNofileSapsysHard            system.SecurityLimitInt
	LimitNofileSdbaSoft, LimitNofileSdbaHard                system.SecurityLimitInt
	LimitNofileDbaSoft, LimitNofileDbaHard                  system.SecurityLimitInt
	KernelShmMax, KernelShmAll, KernelShmMni, VMMaxMapCount uint64
	KernelSemMsl, KernelSemMns, KernelSemOpm, KernelSemMni  uint64
}

1275776 - Linux: Preparing SLES for SAP environments

func (PrepareForSAPEnvironments) Apply

func (prepare PrepareForSAPEnvironments) Apply() error

func (PrepareForSAPEnvironments) Initialise

func (prepare PrepareForSAPEnvironments) Initialise() (Note, error)

func (PrepareForSAPEnvironments) Name

func (prepare PrepareForSAPEnvironments) Name() string

func (PrepareForSAPEnvironments) Optimise

func (prepare PrepareForSAPEnvironments) Optimise() (Note, error)

type SUSENetCPUOptimisation

type SUSENetCPUOptimisation struct {
	SysconfigPrefix string

	// Section "SLES11/12 Network Tuning & Optimization"
	NetCoreWmemMax, NetCoreRmemMax                                   uint64
	NetCoreNetdevMaxBacklog, NetCoreSoMaxConn                        uint64
	NetIpv4TcpRmem, NetIpv4TcpWmem                                   uint64
	NetIpv4TcpTimestamps, NetIpv4TcpSack                             uint64
	NetIpv4TcpFack, NetIpv4TcpDsack                                  uint64
	NetIpv4IpfragLowThres, NetIpv4IpfragHighThres                    uint64
	NetIpv4TcpMaxSynBacklog, NetIpv4TcpSynackRetries                 uint64
	NetIpv4TcpRetries2                                               uint64
	NetTcpKeepaliveTime, NetTcpKeepaliveProbes, NetTcpKeepaliveIntvl uint64
	NetTcpTwRecycle, NetTcpTwReuse, NetTcpFinTimeout                 uint64
	NetTcpMtuProbing                                                 uint64
	// Section "Basic TCP/IP Optimization for SLES
	NetIpv4TcpSyncookies, NetIpv4ConfAllAcceptSourceRoute                 uint64
	NetIpv4ConfAllAcceptRedirects, NetIpv4ConfAllRPFilter                 uint64
	NetIpv4IcmpEchoIgnoreBroadcasts, NetIpv4IcmpIgnoreBogusErrorResponses uint64
	NetIpv4ConfAllLogMartians                                             uint64
	KernelRandomizeVASpace, KernelKptrRestrict                            uint64
	FSProtectedHardlinks, FSProtectedSymlinks                             uint64
	KernelSchedChildRunsFirst                                             uint64
}

SUSE-GUIDE-01 - SLES 11/12: Network, CPU Tuning and Optimization – Part 2 https://www.suse.com/communities/blog/sles-1112-network-cpu-tuning-optimization-part-2/

func (SUSENetCPUOptimisation) Apply

func (st SUSENetCPUOptimisation) Apply() error

func (SUSENetCPUOptimisation) Initialise

func (st SUSENetCPUOptimisation) Initialise() (Note, error)

func (SUSENetCPUOptimisation) Name

func (st SUSENetCPUOptimisation) Name() string

func (SUSENetCPUOptimisation) Optimise

func (st SUSENetCPUOptimisation) Optimise() (Note, error)

type SUSESysOptimisation

type SUSESysOptimisation struct {
	SysconfigPrefix string

	// Section "SLES Memory Tuning and Optimization"
	VMNumberHugePages, VMSwappiness, VMVfsCachePressure uint64
	VMOvercommitMemory, VMOvercommitRatio               uint64

	// Section "SLES Disk I/O & Storage Tuning Optimization"
	VMDirtyRatio, VMDirtyBackgroundRatio uint64
	BlockDeviceSchedulers                param.BlockDeviceSchedulers
}

SUSE-GUIDE-01 - SLES 11/12 OS Tuning & Optimization Guide – Part 1 https://www.suse.com/communities/blog/sles-1112-os-tuning-optimisation-guide-part-1/

func (SUSESysOptimisation) Apply

func (st SUSESysOptimisation) Apply() error

func (SUSESysOptimisation) Initialise

func (st SUSESysOptimisation) Initialise() (Note, error)

func (SUSESysOptimisation) Name

func (st SUSESysOptimisation) Name() string

func (SUSESysOptimisation) Optimise

func (st SUSESysOptimisation) Optimise() (Note, error)

type TuningOptions

type TuningOptions map[string]Note // Collection of tuning options from SAP notes and 3rd party vendors.

func GetTuningOptions

func GetTuningOptions(thirdPartyTuningDir string) TuningOptions

Return all built-in tunable SAP notes together with those defined by 3rd party vendors.

func (*TuningOptions) GetSortedIDs

func (opts *TuningOptions) GetSortedIDs() (ret []string)

Return all tuning option IDs, sorted in ascending order.

type VmwareGuestIOElevator

type VmwareGuestIOElevator struct {
	BlockDeviceSchedulers param.BlockDeviceSchedulers
}

2161991 - VMware vSphere (guest) configuration guidelines

func (VmwareGuestIOElevator) Apply

func (vmio VmwareGuestIOElevator) Apply() error

func (VmwareGuestIOElevator) Initialise

func (vmio VmwareGuestIOElevator) Initialise() (Note, error)

func (VmwareGuestIOElevator) Name

func (vmio VmwareGuestIOElevator) Name() string

func (VmwareGuestIOElevator) Optimise

func (vmio VmwareGuestIOElevator) Optimise() (Note, error)

Jump to

Keyboard shortcuts

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