Merge "sde: resource config: Refactor scaling logic into util functions"