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

Update the way we calculate SU*Hours for a project. #21

Merged
merged 2 commits into from
Dec 15, 2023

Conversation

naved001
Copy link
Collaborator

@naved001 naved001 commented Dec 14, 2023

The old method normalizes RAM and CPU ratio descrepancies. It calcualted vCPU hours and memory hours for each pod, summed it up at the project level and then calculated SU hours ( max(vcpu_hours, memory_hours/4).

The new method avoids this by "assigning" fractional SUs to a pod, calculating SU hours at the pod level before summing it up at the project level. This accurately captures the SU usage.

Closes #17

@naved001 naved001 requested a review from joachimweyl December 14, 2023 18:11
@naved001
Copy link
Collaborator Author

closes #17

The old method normalizes RAM and CPU ratio descrepancies. It calcualted vCPU
hours and memory hours for each pod, summed it up at the project level and
*then* calculated SU hours ( max(vcpu_hours, memory_hours/4).

The new method avoids this by "assigning" fractional SUs to a pod, calculating
SU hours at the pod level before summing it up at the project level. This
accurately captures the SU usage.

closes CCI-MOC#17
openshift_metrics/tests/test_utils.py Outdated Show resolved Hide resolved
openshift_metrics/tests/test_utils.py Show resolved Hide resolved
openshift_metrics/tests/test_utils.py Show resolved Hide resolved
* take care of removing temporary files
* speed up tests
@naved001
Copy link
Collaborator Author

@larsks thanks for the feedback, I have addressed your comments with another commit.

@naved001 naved001 merged commit aca59a0 into CCI-MOC:main Dec 15, 2023
1 check passed
@naved001 naved001 deleted the new-maths branch October 29, 2024 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

change how we do the maths when calculating SUs
2 participants