Skip to content

Commit

Permalink
Hostfrequencyscaling (#140)
Browse files Browse the repository at this point in the history
* Added Host Frequency Scaling Module and Related Extensions.

* buildGraph now looks for in mutations as well as out

* buildGraph: also search for in-mutations when building

* adding cpuburn module in yaml file

* error due to const name changes

* Adds websocket

* revamping frequency scaling

* Error correction

* error fixing

* fixing none to performance

* adding exclude of temp none

* mapping

* getting back NONE mutation

* set logging to 10

* making freq scaler discoverable

* adding freqscaler disc

* bug fix

* debug statement

* adding more freq

* making discoverable by one module

* no msg

* reverse the discs

* changing freq limits

* Removing check

* removing long debug messages

* remove dup discovery of freq scal

* Adding debugging statement

* buildGraphStage1 rewrite of buildGraph; also no longer require unique start

* adding cpuburn

* thermalLog info

* making thermal log configable

* bug fix

* fixing variable names

* fixing variable

* redeclaration issue

* createmode

* fixing format issue

* add file open init

* opening file single time

* bug

* bug

* bug

* naming convention

* error dec

* scalerconfigable plus changing thresholds

* bug fix

* better edge elimination in stage2 graph build; graph sanity check

* buildGraph stage 2 now generates sane, discovery dependency aware graphs

* freqdiscovery

* time in ns

* powersave only

* adding schedutil scaler

* perf

* adjusting the thresholds

* reversing back scalers to normal flow

* changing normal/high temp thresholds

* remove debug print statements

* making thresholds config flat

* error fixing

* PS OVER DURATION

* PSENFORCE Bug

* bug fix

* PSENFORCE

* Bug fixing in PS Enforcement

* Added time bound and thermal bound scaling

* bug fixing

* Debug statment

* bug fix

* debug statement

* converting current thermal into decimal

* DEBUG statement

* Bug fix

* bug fix

* discovering perf after ps

* adding node

* changing mutation timeout

* Adding ticker for thermal bound scenario

* setting the muttaion timeout to "1s"

* adding condition for powersave

* renaming parameters

* bug fix

* fixing errors from rebase

* fixing weird whitespace issue

* general cleanup

* removing pipxe-child and some other changes

* fixing whitespacing

* setting child log level back to 7

Co-authored-by: J. Lowell Wofford <[email protected]>
Co-authored-by: Kevin Pelzel <[email protected]>
  • Loading branch information
3 people committed Jan 8, 2020
1 parent b066ff5 commit 4f8d3ad
Show file tree
Hide file tree
Showing 13 changed files with 1,293 additions and 146 deletions.
2 changes: 2 additions & 0 deletions config/pipxe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ extensions:
- github.com/hpc/kraken/extensions/IPv4
- github.com/hpc/kraken/extensions/RPi3
- github.com/hpc/kraken/extensions/HostThermal
- github.com/hpc/kraken/extensions/HostFrequencyScaler
# included modules
modules:
- github.com/hpc/kraken/modules/restapi
- github.com/hpc/kraken/modules/websocket
- github.com/hpc/kraken/modules/rfpipower
- github.com/hpc/kraken/modules/pipxe
- github.com/hpc/kraken/modules/hostthermaldiscovery
- github.com/hpc/kraken/modules/hostfrequencyscaling
- github.com/hpc/kraken/modules/cpuburn
32 changes: 32 additions & 0 deletions extensions/HostFrequencyScaler/HostFrequencyScaler.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package hostfrequencyscaler

import (
"github.com/golang/protobuf/proto"
"github.com/golang/protobuf/ptypes"
"github.com/hpc/kraken/core"
pb "github.com/hpc/kraken/extensions/HostFrequencyScaler/proto"
"github.com/hpc/kraken/lib"
)

//go:generate protoc -I ../../core/proto/include -I proto --go_out=plugins=grpc:proto proto/HostFrequencyScaler.proto

/////////////////
// HostFrequencyScaler Object /
///////////////

var _ lib.Extension = HostFrequencyScaler{}

type HostFrequencyScaler struct{}

func (HostFrequencyScaler) New() proto.Message {
return &pb.HostFrequencyScaler{}
}

func (r HostFrequencyScaler) Name() string {
a, _ := ptypes.MarshalAny(r.New())
return a.GetTypeUrl()
}

func init() {
core.Registry.RegisterExtension(HostFrequencyScaler{})
}
110 changes: 110 additions & 0 deletions extensions/HostFrequencyScaler/proto/HostFrequencyScaler.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions extensions/HostFrequencyScaler/proto/HostFrequencyScaler.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/* HostFrequencyScaler.proto: describes host specific CPU frquency scaling policy objects
*
* Author: Ghazanfar Ali <[email protected]>, Kevin Pelzel <[email protected]>;J. Lowell Wofford <[email protected]>
*
* This software is open source software available under the BSD-3 license.
* Copyright (c) 2019, Triad National Security, LLC
* See LICENSE file for details.
*/

syntax = "proto3";
package proto;

message HostFrequencyScaler{
enum ScalerState {
NONE = 0;
POWER_SAVE = 1;
PERFORMANCE = 2;
SCHEDUTIL = 3;

}
ScalerState state = 1;

}
58 changes: 29 additions & 29 deletions extensions/HostThermal/proto/HostThermal.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions extensions/HostThermal/proto/HostThermal.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@
package proto;

message HostThermal {
enum hostThermalState {
enum cpuState {
CPU_TEMP_NONE = 0;
CPU_TEMP_NORMAL = 1;
CPU_TEMP_HIGH = 2;
CPU_TEMP_CRITICAL = 3;
//TEMP_WAIT = 1; // Thermal request sent to node

}
hostThermalState state = 1;
cpuState state = 1;
}
2 changes: 1 addition & 1 deletion modules/cpuburn/cpuburn.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (*CPUBurn) NewConfig() (r proto.Message) {
ThermalThrottle: true,
ThermalPoll: 1,
ThermalResume: 60000,
ThermalCrit: 85000,
ThermalCrit: 98000,
Workers: 4,
WorkersThrottled: 0,
}
Expand Down
Loading

0 comments on commit 4f8d3ad

Please sign in to comment.