Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In GetGPUPower(), Kepler should use the per GPU Power consumption to calculate the process's how much power consumed by the process #1293

Open
rootfs opened this issue Mar 6, 2024 · 1 comment
Assignees
Labels
kind/feature New feature or request

Comments

@rootfs
Copy link
Contributor

rootfs commented Mar 6, 2024

What would you like to be added?

Here is the current implementation. It takes into account of all the GPU power from every devices and attributes regardless of their differences.

// GetComponentsPower returns GPU Power in Watts associated to each each process/process/pod
func (r *RatioPowerModel) GetGPUPower(isIdlePower bool) ([]float64, error) {
	nodeComponentsPowerOfAllProcesses := []float64{}

	// the number of processes is used to evernly divide the power consumption for OTHER and UNCORE
	// we do not use CPU utilization for OTHER and UNCORE because they are not necessarily directly
	numProcesses := float64(r.xidx)

	// estimate the power for each process
	for processIdx := 0; processIdx < r.xidx; processIdx++ {
		var processPower float64

		// TODO: idle power should be divided accordinly to the process requested resource
		if isIdlePower {
			processPower = r.nodeFeatureValues[GpuIdlePower] / numProcesses
		} else {
			processPower = r.getPowerByRatio(processIdx, int(GpuUsageMetric), int(GpuDynPower), numProcesses)
		}
		nodeComponentsPowerOfAllProcesses = append(nodeComponentsPowerOfAllProcesses, processPower)
	}
	return nodeComponentsPowerOfAllProcesses, nil
}

Why is this needed?

We should get per GPU power and attribute only to those processes that use this GPU.

@marceloamaral
Copy link
Collaborator

Right, we should use the parent GPU, not the MIG slide to calculate the power consumption using the Ratio Power model.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment