-
Notifications
You must be signed in to change notification settings - Fork 304
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
HPCC-31650 Address incorrect analyzer cost calculations and cost threshold #19360
base: master
Are you sure you want to change the base?
Conversation
d605198
to
215ac70
Compare
The title does not reference a jira, so I can't check the scope of the PR. |
Sorry, fixed. @ghalliday |
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-31650 Jirabot Action Result: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like I forgot to submit this comments - sorry
common/wuanalysis/anarule.cpp
Outdated
@@ -21,6 +21,13 @@ | |||
#include "anarule.hpp" | |||
#include "commonext.hpp" | |||
|
|||
|
|||
static cost_type calcCost(stat_type timePenalty, const stat_type clusterCostPerHour) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with the other global calc cost function this should probably swap the parameters
common/wuanalysis/anarule.cpp
Outdated
|
||
static cost_type calcCost(stat_type timePenalty, const stat_type clusterCostPerHour) | ||
{ | ||
double timePenaltyPerHour = (double)statUnits2seconds(timePenalty) / 3600; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: statsUnits2seconds should probably return a double
picky: timePenaltyHours rather than PerHour
common/wuanalysis/anawu.cpp
Outdated
@@ -71,10 +72,11 @@ struct WuOption | |||
|
|||
constexpr struct WuOption wuOptionsDefaults[watOptMax] | |||
= { {watOptMinInterestingTime, "minInterestingTime", 1000, wutOptValueTypeMSec}, | |||
{watOptMinInterestingCost, "minInterestingCost", 30000, wutOptValueTypeMSec}, | |||
{watOptMinInterestingCost, "minInterestingCost", money2cost_type(5.0) /* $5 */, wutOptValueTypeCost}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$5 is quite a lot. That is probably 15-30 minutes on many of our clusters - compared to the previous threshold of 30s. What is the reason for this change? Should there be thresholds for cost and timing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We didn't have a $ threshold before, so I chose an arbitrary value. I can change it to a lower value. Do you think this threshold should be $0.10?
It made sense to only have time-penalty based cost when that was all we had. However, after renaming to "Cost Optimizer", it seemed sensible to also have the options in terms of costs.
It would be simple enough to introduce a minInterestingTimePenalty (is there a better name for this?).
If we have both minInterestingCost and minInterestingTimePenalty, should the issue be reported if either condition is met or should both conditions have to be met?
I was also thinking to ignore the minInterestingCost option if the cluster rate is 0.00. Is that sensible? The reason is that if the cpu rates aren't provided, then all issues will fail to meet the threshould and so would be ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My thoughts:
I think it would be worth discussing with tony kirk and/or chad to see what they would consider interesting.
Cost is definitely interesting - I suspect any waste over $1 is worth noting. However if you are running on hthor, or a small 20way cluster, then delays of 30s or may also be interesting. Again, I would defer to Tony and Chad for the thresholds they are interested in. Maybe there should be some colour coding in eclwatch to highlight anything over a $1.
I suspect it would be worth having two options - not sure of the best name for the time maybe minInterestingWaste? I doubt these have ever been overridden so feel free to rename them. Either option should be ignored if they are 0, and the error is reported if either condition is true. If you had the time and cost thresholds then you would still report even if the calculated cost was 0.
3055bf3
to
3fc3049
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, please squash
a9aff72
to
3b3c4c7
Compare
* The rate used to calculate the cost of issues has been updated so that the unit is consistent and produces valid cost calculation. * 'minInterestingCost' is a decimal value to set the minimum dollar cost value for reported issues. * 'minInterestingCost' is compared with the calculated cost of the issue * 'minInterestingWaste' is a new option to set the minimum time threshold for reported issues. Signed-off-by: Shamser Ahmed <[email protected]>
Type of change:
Checklist:
Smoketest:
Testing: