Resource allocation optimization