Documentation
¶
Overview ¶
Copyright 2022 Hyeon-Jun Jang, SSLab, Konkuk University
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func CalAvg(array []uint64, windowSize int) float64
- func CheckPodPath(pi *PodInfo) bool
- func GetCpuAcctUsage(cpuPath string) (uint64, uint64)
- func GetFileParamUint(Path, File string) uint64
- func GetFileUint(path string) (uint64, bool)
- func GetGpuAcctUsage(gpuPath string) (uint64, uint64)
- func GetMtime() (uint64, error)
- func PathExists(path string) bool
- func ReadCPUMax(cpuPath string) uint64
- func ReadCPUStat(cpuPath string) (uint64, bool)
- func UpdateGemini()
- func WriteCPUMax(cpuPath string, quota uint64)
- type AcctUsageAndTime
- type Configuraion
- type Monitor
- type PodIDtoNameMap
- type PodInfo
- type PodInfoMap
- type PodStatus
- type ResourceInfo
- func (ri *ResourceInfo) AvgUsage() float64
- func (ri *ResourceInfo) DynamicWeight() float64
- func (ri *ResourceInfo) Init(name ResourceName, scale int, price float64)
- func (ri *ResourceInfo) Limit() float64
- func (ri *ResourceInfo) Price() float64
- func (ri *ResourceInfo) SetLimit(limit float64)
- func (ri *ResourceInfo) Usage() float64
- type ResourceName
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPodPath ¶
func GetCpuAcctUsage ¶
Get AcctUsage Functions From Cgroup or GPU Virt
func GetFileParamUint ¶
func GetFileUint ¶
func GetGpuAcctUsage ¶
func PathExists ¶
func ReadCPUMax ¶
func ReadCPUStat ¶
func UpdateGemini ¶
func UpdateGemini()
func WriteCPUMax ¶
Types ¶
type AcctUsageAndTime ¶
type AcctUsageAndTime struct {
// contains filtered or unexported fields
}
type Configuraion ¶
type Configuraion struct {
// contains filtered or unexported fields
}
type Monitor ¶
type Monitor struct { RunningPodMap PodInfoMap CompletedPodMap PodInfoMap // contains filtered or unexported fields }
func NewMonitor ¶
func (*Monitor) FindPodNameById ¶
Func Name : FindPodNameById() Objective : 1) Find the Pod Name in RunningPodMap Using ID
func (*Monitor) MonitorAndAutoScale ¶
func (m *Monitor) MonitorAndAutoScale()
Func Name : MonitorAndAutoScale()
Objective : 1) Monitoring the pods in RunningPodMap 2) Check and Remove Completed Pods
func (*Monitor) UpdateNewPod ¶
Func Name : UpdateNewPod() Objective : 1) Initalize New Pod
- Pulling and Wait for New Pod
type PodIDtoNameMap ¶
type PodInfo ¶
type PodInfo struct { PodName string ID string TokenQueue float64 TokenReservation float64 UpdatedCount int64 // Update Count from KuScale RNs []ResourceName RIs map[ResourceName]*ResourceInfo // contains filtered or unexported fields }
Pod Info are managed by KuScale
func NewPodInfo ¶
func NewPodInfo(podName string, RNs []ResourceName) *PodInfo
func (*PodInfo) CPU ¶
func (pi *PodInfo) CPU() *ResourceInfo
func (*PodInfo) GPU ¶
func (pi *PodInfo) GPU() *ResourceInfo
func (*PodInfo) SetInitLimit ¶
func (pi *PodInfo) SetInitLimit()
func (*PodInfo) UpdateDynamicWeight ¶
Func Name : (pi *PodInfo) UpdateDynamicWeight(staticV float64)
Objective : 1) Update DynamicWeight
func (*PodInfo) UpdatePodUsage ¶
func (pi *PodInfo) UpdatePodUsage()
Func Name : (pi *PodInfo) UpdatePodUsage()
Objective : 1) Monitoring the pods in RunningPodMap 2) Check and Remove Completed Pods
func (*PodInfo) UpdateTokenQueue ¶
func (pi *PodInfo) UpdateTokenQueue()
Func Name : (pi *PodInfo) UpdateTokenQueue()
Objective : 1) Update TokenQueue
type PodInfoMap ¶
type ResourceInfo ¶
type ResourceInfo struct {
// contains filtered or unexported fields
}
func (*ResourceInfo) AvgUsage ¶
func (ri *ResourceInfo) AvgUsage() float64
func (*ResourceInfo) DynamicWeight ¶
func (ri *ResourceInfo) DynamicWeight() float64
func (*ResourceInfo) Init ¶
func (ri *ResourceInfo) Init(name ResourceName, scale int, price float64)
func (*ResourceInfo) Limit ¶
func (ri *ResourceInfo) Limit() float64
func (*ResourceInfo) Price ¶
func (ri *ResourceInfo) Price() float64
func (*ResourceInfo) SetLimit ¶
func (ri *ResourceInfo) SetLimit(limit float64)
func (*ResourceInfo) Usage ¶
func (ri *ResourceInfo) Usage() float64
type ResourceName ¶
type ResourceName string