Documentation
¶
Index ¶
- Constants
- func AddProc(path string, pid uint64) error
- func CgroupID2NumaID(fullCgID uint32) (int, error)
- func IsPoolV2ID(fullCgID uint32) bool
- func MakeCgroupPathByID(id uint32) string
- func MakeCgroupPoolV1PathByString(group string) string
- func MakeCgroupPoolV2PathByString(group string) string
- func MakeFullCgID(id uint16, usePoolV2 bool, numa int32) uint32
- func MakeNoPrefixCgroupPathByID(id uint32) string
- func SetCubeboxCgroupLimit(ctx context.Context, group string, cpuQ resource.Quantity, ...) error
- type CgPlugin
- func (l *CgPlugin) CleanUp(ctx context.Context, opts *workflow.CleanContext) error
- func (l *CgPlugin) CollectMetric(ctx context.Context) *CgroupMetrics
- func (l *CgPlugin) Create(ctx context.Context, opts *workflow.CreateContext) (err error)
- func (l *CgPlugin) Destroy(ctx context.Context, opts *workflow.DestroyContext) error
- func (l *CgPlugin) ID() string
- func (l *CgPlugin) Init(ctx context.Context, opts *workflow.InitInfo) error
- func (l *CgPlugin) RegisterOperation(mux *http.ServeMux) error
- func (l *CgPlugin) ReloadVmSnapshotSpecs() error
- type CgroupMetrics
- type Config
- type CubeVMMResource
- type Info
- type OverheadConfig
- func (overhead *OverheadConfig) GetResourceWithOverhead(ctx context.Context, realReq *cubebox.RunCubeSandboxRequest, ...) (rq *cubeboxstore.ResourceWithOverHead, err error)
- func (overhead *OverheadConfig) MatchVMSnapshotSpec(ctx context.Context, req cubeboxstore.ResourceWithOverHead, ...) (CubeVMMResource, *cubeboxstore.ResourceWithOverHead)
- type VMSnapshotSpecsByProduct
- type VmSnapshotSpec
Constants ¶
View Source
const CgPoolIdLimit = math.MaxUint16 + 1
View Source
const CgPoolV1IdLimit = CgPoolIdLimit
Variables ¶
This section is empty.
Functions ¶
func CgroupID2NumaID ¶
func IsPoolV2ID ¶
func MakeCgroupPathByID ¶
Types ¶
type CgPlugin ¶
type CgPlugin struct {
// contains filtered or unexported fields
}
func (*CgPlugin) CollectMetric ¶
func (l *CgPlugin) CollectMetric(ctx context.Context) *CgroupMetrics
func (*CgPlugin) ReloadVmSnapshotSpecs ¶
type CgroupMetrics ¶
type Config ¶
type Config struct {
RootPath string `toml:"root_path"`
PoolSize int `toml:"pool_size"`
PoolTriggerIntervalInMs int `toml:"pool_trigger_interval_in_ms"`
VmMemoryOverheadBase string `toml:"vm_memory_overhead_base"`
VmMemoryOverheadCoefficient int64 `toml:"vm_memory_overhead_coefficient"`
HostMemoryOverheadBase string `toml:"host_memory_overhead_base"`
CubeMsgMemoryOverhead string `toml:"cubemsg_memory_overhead"`
VmCpuOverhead string `toml:"vm_cpu_overhead"`
HostCpuOverhead string `toml:"host_cpu_overhead"`
DisableCgroupReuse bool `toml:"disable_cgroup_reuse"`
VmSnapshotSpecsConfig string `toml:"vm_snapshot_specs_config"`
SnapshotDiskDir string `toml:"snapshot_disk_dir"`
// contains filtered or unexported fields
}
func (*Config) ShouldSetMemoryReparentFile ¶
type CubeVMMResource ¶
type Info ¶
type Info struct {
CgroupID string
ResourceQuantity cubeboxstore.ResourceWithOverHead
VmSnapshotSpec CubeVMMResource
UsePoolV2 bool
}
type OverheadConfig ¶
type OverheadConfig struct {
VmMemoryBase resource.Quantity
VmMemoryCoefficient decimal.Decimal
HostMemoryBase resource.Quantity
CubeMsgMemory resource.Quantity
VmCpu resource.Quantity
HostCpu resource.Quantity
SnapshotDiskDir string
}
func (*OverheadConfig) GetResourceWithOverhead ¶
func (overhead *OverheadConfig) GetResourceWithOverhead(ctx context.Context, realReq *cubebox.RunCubeSandboxRequest, volumeInfo interface{}) (rq *cubeboxstore.ResourceWithOverHead, err error)
func (*OverheadConfig) MatchVMSnapshotSpec ¶
func (overhead *OverheadConfig) MatchVMSnapshotSpec(ctx context.Context, req cubeboxstore.ResourceWithOverHead, snaps []VmSnapshotSpec, instanceType string) (CubeVMMResource, *cubeboxstore.ResourceWithOverHead)
type VMSnapshotSpecsByProduct ¶
type VMSnapshotSpecsByProduct map[string][]VmSnapshotSpec
Click to show internal directories.
Click to hide internal directories.