sealsupra

package
v1.24.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: Apache-2.0, MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SupraSealMeasures = struct {
	PhaseLockCount    *stats.Int64Measure
	PhaseWaitingCount *stats.Int64Measure
	PhaseAvgDuration  *stats.Float64Measure
}{
	PhaseLockCount:    stats.Int64(pre+"phase_lock_count", "Number of active locks in each phase", stats.UnitDimensionless),
	PhaseWaitingCount: stats.Int64(pre+"phase_waiting_count", "Number of goroutines waiting for a phase lock", stats.UnitDimensionless),
	PhaseAvgDuration:  stats.Float64(pre+"phase_avg_duration", "Average duration of each phase in seconds", stats.UnitSeconds),
}

SupraSealMeasures groups all SupraSeal metrics.

Functions

func FormatSupraSealConfig

func FormatSupraSealConfig(config SupraSealConfig, system SystemInfo, additionalInfo AdditionalSystemInfo) string

func GenerateSupraSealConfigString

func GenerateSupraSealConfigString(dualHashers bool, batchSize int, nvmeDevices []string) (string, error)

func SupraSpaceUse

func SupraSpaceUse(ft storiface.SectorFileType, ssize abi.SectorSize) (uint64, error)

Types

type AdditionalSystemInfo

type AdditionalSystemInfo struct {
	CPUName           string
	MemorySize        string
	MemoryChannels    int
	InstalledModules  int
	MaxMemoryCapacity string
	MemoryType        string
	MemorySpeed       string
}

func ExtractAdditionalSystemInfo

func ExtractAdditionalSystemInfo() (AdditionalSystemInfo, error)

type CoordinatorConfig

type CoordinatorConfig struct {
	Core    int
	Hashers int
}

type SectorConfig

type SectorConfig struct {
	Sectors      int
	Coordinators []CoordinatorConfig
}

type SupraSeal

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

func NewSupraSeal

func NewSupraSeal(sectorSize string, batchSize, pipelines int, dualHashers bool, nvmeDevices []string, machineHostAndPort string,
	slots *slotmgr.SlotMgr, db *harmonydb.DB, api SupraSealNodeAPI, storage *paths.Remote, sindex paths.SectorIndex) (*SupraSeal, error)

func (*SupraSeal) Adder

func (s *SupraSeal) Adder(taskFunc harmonytask.AddTaskFunc)

func (*SupraSeal) CanAccept

func (s *SupraSeal) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.TaskEngine) (*harmonytask.TaskID, error)

func (*SupraSeal) Do

func (s *SupraSeal) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err error)

func (*SupraSeal) TypeDetails

func (s *SupraSeal) TypeDetails() harmonytask.TaskTypeDetails

type SupraSealConfig

type SupraSealConfig struct {
	NVMeDevices []string
	Topology    TopologyConfig

	// Diagnostic fields (not part of the config)
	RequiredThreads int
	RequiredCCX     int
	RequiredCores   int
	UnoccupiedCores int

	P2WrRdOverlap   bool
	P2HsP1WrOverlap bool
	P2HcP2RdOverlap bool
}

func GenerateSupraSealConfig

func GenerateSupraSealConfig(info SystemInfo, dualHashers bool, batchSize int, nvmeDevices []string) (SupraSealConfig, error)

type SupraSealNodeAPI

type SupraSealNodeAPI interface {
	ChainHead(context.Context) (*types.TipSet, error)
	StateGetRandomnessFromTickets(context.Context, crypto.DomainSeparationTag, abi.ChainEpoch, []byte, types.TipSetKey) (abi.Randomness, error)
}

type SystemInfo

type SystemInfo struct {
	ProcessorCount int
	CoreCount      int
	ThreadsPerCore int
	CoresPerL3     int
}

func GetSystemInfo

func GetSystemInfo() (*SystemInfo, error)

type TopologyConfig

type TopologyConfig struct {
	PC1Writer       int
	PC1Reader       int
	PC1Orchestrator int
	PC2Reader       int
	PC2Hasher       int
	PC2HasherCPU    int
	PC2Writer       int
	PC2WriterCores  int
	C1Reader        int
	SectorConfigs   []SectorConfig
}

Jump to

Keyboard shortcuts

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