Skip to content

Commit

Permalink
Cast allocation to avoid fractional CPU allocations
Browse files Browse the repository at this point in the history
  • Loading branch information
yashpatel6 committed Dec 13, 2024
1 parent 8b500b7 commit a9d174e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/resource_handler/resource_handler.config
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class SystemResources {
def min_allocation = this.check_limits(min_raw, type)
def max_allocation = this.check_limits(max_raw, type)

def requested_allocation = allocation.fraction * (this.resource_limits[type]['max'])
def requested_allocation = (allocation.fraction * (this.resource_limits[type]['max'])).asType(this.resource_limits[type]['type'])

return SystemResources.check_limits(requested_allocation, type, min_allocation, max_allocation)
}
Expand Down

0 comments on commit a9d174e

Please sign in to comment.